|
@@ -131,10 +131,13 @@ export default abstract class LeafletMap { |
|
@@ -131,10 +131,13 @@ export default abstract class LeafletMap { |
131
|
tooltipAnchor: [16, -28],
|
131
|
tooltipAnchor: [16, -28],
|
132
|
shadowSize: [41, 41]
|
132
|
shadowSize: [41, 41]
|
133
|
});
|
133
|
});
|
|
|
134
|
+ const customLatLng = this.convertToCustomFormat(mousePositionOnMap);
|
|
|
135
|
+ mousePositionOnMap.lat = customLatLng[this.options.latKeyName];
|
|
|
136
|
+ mousePositionOnMap.lng = customLatLng[this.options.lngKeyName];
|
|
|
137
|
+
|
134
|
const newMarker = L.marker(mousePositionOnMap, { icon }).addTo(this.map);
|
138
|
const newMarker = L.marker(mousePositionOnMap, { icon }).addTo(this.map);
|
135
|
this.addMarkers.push(newMarker);
|
139
|
this.addMarkers.push(newMarker);
|
136
|
const datasourcesList = document.createElement('div');
|
140
|
const datasourcesList = document.createElement('div');
|
137
|
- const customLatLng = this.convertToCustomFormat(mousePositionOnMap);
|
|
|
138
|
const header = document.createElement('p');
|
141
|
const header = document.createElement('p');
|
139
|
header.appendChild(document.createTextNode('Select entity:'));
|
142
|
header.appendChild(document.createTextNode('Select entity:'));
|
140
|
header.setAttribute('style', 'font-size: 14px; margin: 8px 0');
|
143
|
header.setAttribute('style', 'font-size: 14px; margin: 8px 0');
|
|
@@ -415,7 +418,6 @@ export default abstract class LeafletMap { |
|
@@ -415,7 +418,6 @@ export default abstract class LeafletMap { |
415
|
}else if(position.lng < -180){
|
418
|
}else if(position.lng < -180){
|
416
|
position.lng = -180;
|
419
|
position.lng = -180;
|
417
|
};
|
420
|
};
|
418
|
-
|
|
|
419
|
return {
|
421
|
return {
|
420
|
[this.options.latKeyName]: position.lat,
|
422
|
[this.options.latKeyName]: position.lat,
|
421
|
[this.options.lngKeyName]: position.lng
|
423
|
[this.options.lngKeyName]: position.lng
|