Commit 923e3a48a87c674add855b184b4399107a84a8dc

Authored by Vladyslav_Prykhodko
1 parent 890024ee

Input maps fixed: error create the first marker

@@ -79,6 +79,9 @@ export class MapWidgetController implements MapWidgetInterface { @@ -79,6 +79,9 @@ export class MapWidgetController implements MapWidgetInterface {
79 this.map = new MapClass($element, this.settings, this.ctx.$injector); 79 this.map = new MapClass($element, this.settings, this.ctx.$injector);
80 this.map.setImageAlias(this.subscribeForImageAttribute()); 80 this.map.setImageAlias(this.subscribeForImageAttribute());
81 this.map.saveMarkerLocation = this.setMarkerLocation; 81 this.map.saveMarkerLocation = this.setMarkerLocation;
  82 + if (this.settings.draggableMarker) {
  83 + this.map.setDataSources(parseData(this.data));
  84 + }
82 } 85 }
83 86
84 map: LeafletMap; 87 map: LeafletMap;
@@ -252,9 +255,6 @@ export class MapWidgetController implements MapWidgetInterface { @@ -252,9 +255,6 @@ export class MapWidgetController implements MapWidgetInterface {
252 if (this.settings.showPolygon) { 255 if (this.settings.showPolygon) {
253 this.map.updatePolygons(parseData(this.data)); 256 this.map.updatePolygons(parseData(this.data));
254 } 257 }
255 - if (this.settings.draggableMarker) {  
256 - this.map.setDataSources(parseData(this.data));  
257 - }  
258 this.map.updateMarkers(parseData(this.data)); 258 this.map.updateMarkers(parseData(this.data));
259 } 259 }
260 260