I have a form which has a textfield called address
. I want to get the latitude and longitude value when the user types in his address in the textbox and clicks a button. How can I do this? I have done this using PHP but I need to get the latitude and longitude using Javascript/Google API. Any link to some tutorial?
You'll want to create a Geocoding Request with AJAX.
Here is some more information about Geocoding requests from Google.
And here is information on AJAX from the JQuery site.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.