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
We need to allow the users to use their current location in the map. For this, we implemented this little script
function getLocation() {
if ("geolocation" in navigator) {
navigator.geolocation.getCurrentPosition(showPosition, error);
} else {
$("#location-message").show()
}
}
function showPosition(position) {
$("#id_location").val(position.coords.latitude + "," + position.coords.longitude)
}
function error(err) {
$("#location-message").show()
}
it is working fine, the latitude and longitude is automatically updated; however, the marker is not. How may we force the marker to move to the new coordinates?
We tried editing the coordinates directly and it is not working either; it seems that the marker updates the coordinates field but it does not work in the other way.
Thank you,
The text was updated successfully, but these errors were encountered:
Repository owner
locked and limited conversation to collaborators
Apr 4, 2023
Good day,
We are using the library with this configuration
The model is using a
PlainLocationField
.We need to allow the users to use their current location in the map. For this, we implemented this little script
it is working fine, the latitude and longitude is automatically updated; however, the marker is not. How may we force the marker to move to the new coordinates?
We tried editing the coordinates directly and it is not working either; it seems that the marker updates the coordinates field but it does not work in the other way.
Thank you,
The text was updated successfully, but these errors were encountered: