You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.
In the example you can drag the Marker to a different Position. This is not possible after searching a Position. Here are some more Details:
Use Nomainatin as Service
// lets use nominating service
$nominatim = new ServiceNominatim();
// create geocoder plugin and attach the service
$geoCoderPlugin = new GeoCoder([
'service' => $nominatim,
'clientOptions' => [
// we could leave it to allocate a marker automatically
// but I want to have some fun
'showMarker' => true,
'collapsed' => false,
],
]);
Now here is the callback, after the Marker is "moved"
// initialize our leafLet component
$leafLet = new LeafLet([
'name' => 'geoMap',
'tileLayer' => $tileLayer,
'center' => $center,
'zoom' => $zoom,
'clientEvents' => [
// I added an event to ease the collection of new position
'geocoder_showresult' => 'function(e){
// set markers position
geoMarker.setLatLng(e.Result.center);
geoMarker.dragging.enable(); // NOT WORKING !!!
$(\'input[name="lat"]\').val(e.Result.center.lat);
$(\'input[name="lng"]\').val(e.Result.center.lng);
}'
]
]);
I checked also the Vars geoMarker where draggable is set to true. But still, the Marker cannot be moved after performing a search.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In the example you can drag the Marker to a different Position. This is not possible after searching a Position. Here are some more Details:
Use Nomainatin as Service
Add Maker like in the example
Now here is the callback, after the Marker is "moved"
I checked also the Vars geoMarker where draggable is set to true. But still, the Marker cannot be moved after performing a search.
The text was updated successfully, but these errors were encountered: