forked from Snck3rs/contao-leaflet-maps
Fix geocode plugin.
This commit is contained in:
@@ -15,10 +15,11 @@
|
|||||||
placeholder: '<?php echo $GLOBALS['TL_LANG']['leaflet']['searchPosition']; ?>'
|
placeholder: '<?php echo $GLOBALS['TL_LANG']['leaflet']['searchPosition']; ?>'
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
|
|
||||||
geocoder.markGeocode = function(result) {
|
geocoder.on('markgeocode', function(event) {
|
||||||
var container = document.createElement('div');
|
var container = document.createElement('div');
|
||||||
var link = document.createElement('button');
|
var link = document.createElement('button');
|
||||||
var element = $('<?php echo $this->field; ?>');
|
var element = $('<?php echo $this->field; ?>');
|
||||||
|
var result = event.geocode;
|
||||||
|
|
||||||
link.set('style', 'margin-left: 10px;');
|
link.set('style', 'margin-left: 10px;');
|
||||||
link.appendText('<?php echo $GLOBALS['TL_LANG']['leaflet']['applyPosition']; ?>');
|
link.appendText('<?php echo $GLOBALS['TL_LANG']['leaflet']['applyPosition']; ?>');
|
||||||
@@ -45,9 +46,7 @@
|
|||||||
})
|
})
|
||||||
.addTo(map)
|
.addTo(map)
|
||||||
.openPopup();
|
.openPopup();
|
||||||
|
});
|
||||||
return this;
|
|
||||||
};
|
|
||||||
|
|
||||||
<?php if ($this->marker): ?>
|
<?php if ($this->marker): ?>
|
||||||
geocoder._geocodeMarker = L.marker(<?php echo $this->marker; ?>).addTo(map);
|
geocoder._geocodeMarker = L.marker(<?php echo $this->marker; ?>).addTo(map);
|
||||||
|
|||||||
Reference in New Issue
Block a user