Google Maps – How to Create a Link to a Specific Location

geolocationgoogle maps

I'm looking to create a link to a specific location using latitude and longitude for positioning, however I would also like to be able to add a marker onto the map as well, at the same location.

This is not using the Java or Static maps API, just want a link pointing at maps.google.com

Best Answer

It's very straightforward. Just use the following link, changing the latitude and longitude for yours. The z is the zoom index, you can play with it to get where you want.

http://maps.google.com/?ie=UTF8&hq=&ll=35.028028,-106.536655&z=13

I got this information by clicking on the "Link" button in the right hand corner above a map. This will also allow you to get the latitude and longitude for a location.

I don't know of a good way to make a marker on Google Maps, through the UI anyway. Right click on a point and select "What's Here?" to create a marker, but it will be to the closest thing (business, intersection, address, etc). This essentially performs a search with the latitude and longitude and returns whatever is closest to your search. A URL to do that would be:

http://maps.google.com/maps?q=35.128061,-106.535561&ll=35.126517,-106.535131&z=17

With the q (for query I believe) being the coordinates where you want your marker.

A more effective method, if you are trying to send a link to a specific address would be to search for the address in Google Maps, which will give you a marker on the exact address and then use the "Link" button to get the URL for sharing.