Clear constructor Google map

This commit is contained in:
Vladyslav_Prykhodko 2020-06-09 12:35:14 +03:00
parent b86c5e61e1
commit 12cd73ac9d
2 changed files with 3 additions and 3 deletions

View File

@ -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));

View File

@ -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({