mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-11-29 19:43:50 +01:00
Fix dragging of result icons.
This commit is contained in:
@@ -12,6 +12,7 @@
|
|||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
var element = $('<?php echo $this->field; ?>');
|
var element = $('<?php echo $this->field; ?>');
|
||||||
var geocoder = L.Control.geocoder({
|
var geocoder = L.Control.geocoder({
|
||||||
|
defaultMarkGeocode: false,
|
||||||
collapsed: false,
|
collapsed: false,
|
||||||
placeholder: '<?php echo $GLOBALS['TL_LANG']['leaflet']['searchPosition']; ?>'
|
placeholder: '<?php echo $GLOBALS['TL_LANG']['leaflet']['searchPosition']; ?>'
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
@@ -39,10 +40,9 @@
|
|||||||
map.fitBounds(result.bbox, { padding: [0, 70]});
|
map.fitBounds(result.bbox, { padding: [0, 70]});
|
||||||
map.panTo(result.center);
|
map.panTo(result.center);
|
||||||
|
|
||||||
this._geocodeMarker = new L.Marker(result.center)
|
this._geocodeMarker = new L.Marker(result.center, {draggable: true})
|
||||||
.bindPopup(container, {
|
.bindPopup(container, {
|
||||||
keepInView: true,
|
keepInView: true,
|
||||||
draggable: true,
|
|
||||||
autoPanPaddingTopLeft: [0, 70]
|
autoPanPaddingTopLeft: [0, 70]
|
||||||
})
|
})
|
||||||
.addTo(map)
|
.addTo(map)
|
||||||
|
|||||||
Reference in New Issue
Block a user