Skip to content

How to embedded on a web page so that on user click > data sent to a text field too #9199

Closed Answered by Falke-Design
Zebrafied asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, great to hear that you find Leaflet useful!

However, this issue tracker is used for reporting bugs and discussing new features. For questions on using Leaflet, please use gis.stackexchange.com or stackoverflow.

Before I close this, I wil give you some hints:

  • Add a click listener on the leaflet map-object map.on('click', function(e){}), where you get the latlng over e
  • Send the latlng to a service, which converts the latlng into a text location. Something like https://nominatim.openstreetmap.org/ui/search.html
  • Add the result from the service to your form

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Zebrafied
Comment options

Answer selected by Zebrafied
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants