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