diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/maps/map-widget2.ts b/ui-ngx/src/app/modules/home/components/widget/lib/maps/map-widget2.ts index 58b1140e93..60c7b42a85 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/maps/map-widget2.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/maps/map-widget2.ts @@ -68,7 +68,7 @@ export class MapWidgetController implements MapWidgetInterface { return; } parseWithTranslation.setTranslate(this.translate); - this.map = new MapClass(this.ctx, $element, this.settings, this.ctx.$injector); + this.map = new MapClass(this.ctx, $element, this.settings); this.map.saveMarkerLocation = this.setMarkerLocation; if (this.settings.draggableMarker) { this.map.setDataSources(parseData(this.data)); diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/maps/providers/google-map.ts b/ui-ngx/src/app/modules/home/components/widget/lib/maps/providers/google-map.ts index b0653483c9..b0254ee2c2 100644 --- a/ui-ngx/src/app/modules/home/components/widget/lib/maps/providers/google-map.ts +++ b/ui-ngx/src/app/modules/home/components/widget/lib/maps/providers/google-map.ts @@ -32,9 +32,9 @@ interface GmGlobal { export class GoogleMap extends LeafletMap { private resource: ResourcesService; - constructor(ctx: WidgetContext, $container, options: UnitedMapSettings, private injector: Injector) { + constructor(ctx: WidgetContext, $container, options: UnitedMapSettings) { super(ctx, $container, options); - this.resource = injector.get(ResourcesService); + this.resource = ctx.$injector.get(ResourcesService); this.loadGoogle(() => { const map = L.map($container, {attributionControl: false}).setView(options?.defaultCenterPosition, options?.defaultZoomLevel); (L.gridLayer as any).googleMutant({