Use a URL to link to a Google map with a marker on it

I want to link to google maps at a particular location with a marker on a particular point.

It's easy to link to a location:

http://maps.google.com/?ll=XX.XXXX,XX.XXXX

But how do I drop a marker at that point too? preferably with a bit of my own text but that's just a bonus.

2017 - Google has released documentation on this see new accepted answer: https://stackoverflow.com/a/44477650/359135


Solution 1:

In May 2017 Google launched the official Google Maps URLs documentation. The Google Maps URLs introduces universal cross-platform syntax that you can use in your applications.

Have a look at the following document:

https://developers.google.com/maps/documentation/urls/guide

You can use URLs in search, directions, map and street view modes.

For example, to show the marker at specified position you can use the following URL:

https://www.google.com/maps/search/?api=1&query=36.26577,-92.54324

For further details please read aforementioned documentation.

You can also file feature requests for this API in Google issue tracker.

Hope this helps!

Solution 2:

This format works, but it doesn't seem to be an official way of doing so

http://maps.google.com/maps?q=loc:36.26577,-92.54324

Also you may want to take a look at this. They have a few answers and seem to indicate that this is the new method:

http://maps.google.com/maps?&z=10&q=36.26577+-92.54324&ll=36.26577+-92.54324

Solution 3:

If you want to include a zoom level, you can use this format:

https://www.google.com/maps/place/40.7028722+-73.9868281/@40.7028722,-73.9868281,15z

will redirect to this link (per 2017.09.21)

https://www.google.com/maps/place/40%C2%B042'10.3%22N+73%C2%B059'12.6%22W/@40.7028722,-73.9868281,15z/data=!4m5!3m4!1s0x0:0x0!8m2!3d40.7028722!4d-73.9868281