var resultado = geocoder.geocode(place, function(results) { if (results.length > 0) { var result = results[0]; marker = L.marker(result.center).addTo(map); map.setView(result.center, 12); } else{ alert("{{ gettext('Place not found.') }}") } }); console.log(geocoder); });
</script> </body>
Sandy-Pascal Andriant
unread,
Dec 22, 2024, 2:31:08 PM12/22/24
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Leaflet
Hello,
I get this result
Have you add the necessarily links in the <head> ?
<html> <head> <meta charset="utf-8"> <link rel="stylesheet" href="https://unpkg.com/lea...@1.9.4/dist/leaflet.css" integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=" crossorigin=""/> <!-- Make sure you put this AFTER Leaflet's CSS --> <script src="https://unpkg.com/lea...@1.9.4/dist/leaflet.js" integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo=" crossorigin=""></script> </head> <body>