Open EyadAyman658 opened 2 years ago
I installed the library with npm. What did the trick for me was using the library directly.
import * as mapboxCompare from 'mapbox-gl-compare';
const map = new mapboxCompare(beforeMap, afterMap, container, {});
I have similar issue with another class. And the described trick does not help:
import * as MapboxDrawer from '@mapbox/mapbox-gl-draw';
...
this.mapBoxDraw = new MapboxDrawer(...);
The functionality mentioned above is situated inside Angular library which is consumed by Angular app.
@alexandis have you tried to change the definitions in tsconfig.json ?
@alexandis have you tried to change the definitions in tsconfig.json ?
I've already found my problem: I've installed @types/mapbox__mapbox-gl-draw manually and tried to reference MapboxDraw from there...
Hello, I am still facing the same problem with Angular. I tried all of the above, but I have the same error.
mapbox_gl_compare__WEBPACK_IMPORTED_MODULE_3___default(...) is not a constructor
I don't know what else to do because there is no a types version with index.d.ts
Thank you
i am also facing when i select suggestion on Geocoder I got this error can anyone tell me solution TypeError: react_map_gl__WEBPACK_IMPORTED_MODULE_2__.FlyToInterpolator is not a constructor
Hello, I am still facing the same problem with Angular. I tried all of the above, but I have the same error.
mapbox_gl_compare__WEBPACK_IMPORTED_MODULE_3___default(...) is not a constructor
I don't know what else to do because there is no a types version with index.d.ts Thank you
Did you resolved it?
something is wrong with with mapbox-gl-compare library even though I was trying the example that was mentioned in the docs , any solution for this bug ?
Thanks :)