diff --git a/libs/ngx-mapbox-gl/src/lib/map/map.service.ts b/libs/ngx-mapbox-gl/src/lib/map/map.service.ts index 342a76f8..75318d3f 100644 --- a/libs/ngx-mapbox-gl/src/lib/map/map.service.ts +++ b/libs/ngx-mapbox-gl/src/lib/map/map.service.ts @@ -109,7 +109,7 @@ export class MapService { // options.accessToken || this.MAPBOX_API_KEY // ); if (options.customMapboxApiUrl) { - this.assign(MapboxGl, 'config.API_URL', options.customMapboxApiUrl); + (MapboxGl.baseApiUrl as string) = options.customMapboxApiUrl; } this.createMap({ ...(options.mapOptions as MapboxGl.MapboxOptions),