Skip to content

Commit

Permalink
Fix marker moove - fix #2554
Browse files Browse the repository at this point in the history
  • Loading branch information
TheoLechemia authored and bouttier committed May 22, 2023
1 parent db45d83 commit f63581e
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export class MarkerComponent implements OnInit, OnChanges {
ngOnInit() {
this.map = this.mapservice.map;
this.zoomLevel = this.zoomLevel || this.config.MAPCONFIG.ZOOM_LEVEL_RELEVE;

this.setMarkerLegend();
// activation or not of the marker
if (this.defaultEnable) {
Expand Down Expand Up @@ -138,7 +139,9 @@ export class MarkerComponent implements OnInit, OnChanges {
this.map.addLayer(this.mapservice.marker);
this.markerMoveEvent(this.mapservice.marker);
} else {
this.markerChanged.emit(this.markerToGeojson(this.mapservice.marker.getLatLng()));
const geojsonCoord = this.markerToGeojson(this.mapservice.marker.getLatLng());
this.mapservice.setGeojsonCoord(geojsonCoord);
this.markerChanged.emit(geojsonCoord);
}
});
}
Expand Down

0 comments on commit f63581e

Please sign in to comment.