Commit 12cd73ac9d7c1f48fd99ce38cb8ec5c62a78d917

Authored by Vladyslav_Prykhodko
1 parent b86c5e61

Clear constructor Google map

@@ -68,7 +68,7 @@ export class MapWidgetController implements MapWidgetInterface { @@ -68,7 +68,7 @@ export class MapWidgetController implements MapWidgetInterface {
68 return; 68 return;
69 } 69 }
70 parseWithTranslation.setTranslate(this.translate); 70 parseWithTranslation.setTranslate(this.translate);
71 - this.map = new MapClass(this.ctx, $element, this.settings, this.ctx.$injector); 71 + this.map = new MapClass(this.ctx, $element, this.settings);
72 this.map.saveMarkerLocation = this.setMarkerLocation; 72 this.map.saveMarkerLocation = this.setMarkerLocation;
73 if (this.settings.draggableMarker) { 73 if (this.settings.draggableMarker) {
74 this.map.setDataSources(parseData(this.data)); 74 this.map.setDataSources(parseData(this.data));
@@ -32,9 +32,9 @@ interface GmGlobal { @@ -32,9 +32,9 @@ interface GmGlobal {
32 export class GoogleMap extends LeafletMap { 32 export class GoogleMap extends LeafletMap {
33 private resource: ResourcesService; 33 private resource: ResourcesService;
34 34
35 - constructor(ctx: WidgetContext, $container, options: UnitedMapSettings, private injector: Injector) { 35 + constructor(ctx: WidgetContext, $container, options: UnitedMapSettings) {
36 super(ctx, $container, options); 36 super(ctx, $container, options);
37 - this.resource = injector.get(ResourcesService); 37 + this.resource = ctx.$injector.get(ResourcesService);
38 this.loadGoogle(() => { 38 this.loadGoogle(() => {
39 const map = L.map($container, {attributionControl: false}).setView(options?.defaultCenterPosition, options?.defaultZoomLevel); 39 const map = L.map($container, {attributionControl: false}).setView(options?.defaultCenterPosition, options?.defaultZoomLevel);
40 (L.gridLayer as any).googleMutant({ 40 (L.gridLayer as any).googleMutant({