From 923e3a48a87c674add855b184b4399107a84a8dc Mon Sep 17 00:00:00 2001 From: Vladyslav_Prykhodko Date: Mon, 8 Jun 2020 00:06:57 +0300 Subject: [PATCH] Input maps fixed: error create the first marker --- .../modules/home/components/widget/lib/maps/map-widget2.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 616b3a4261..557631609c 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 @@ -79,6 +79,9 @@ export class MapWidgetController implements MapWidgetInterface { this.map = new MapClass($element, this.settings, this.ctx.$injector); this.map.setImageAlias(this.subscribeForImageAttribute()); this.map.saveMarkerLocation = this.setMarkerLocation; + if (this.settings.draggableMarker) { + this.map.setDataSources(parseData(this.data)); + } } map: LeafletMap; @@ -252,9 +255,6 @@ export class MapWidgetController implements MapWidgetInterface { if (this.settings.showPolygon) { this.map.updatePolygons(parseData(this.data)); } - if (this.settings.draggableMarker) { - this.map.setDataSources(parseData(this.data)); - } this.map.updateMarkers(parseData(this.data)); }