简体   繁体   中英

How can I integrate a location search on my webpage with google maps?

I currently have Google Maps integrated into my webpage. It is being used to tell the user where an event is (generally, it's a user submitted event). The previous programmer put it the functionality to center the map on a latitude and longitude, if you knew it. However, most people don't know the latitude and longitude of locations (sometimes they do but...), and the users want to be able to enter just a street address like you do when you go to maps.google.com . How can I get it to do this?

It's called Geocoding and Google exposes public Geocoding services.

Here's a link to the Google Geocoding Developer service
Here's a link to Yahoo's Geocoding API .

Read the docs. You'll send the address and receive back the Latitude and Longitude.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM