11

A link like this used to work up until the latest revamp of Google Maps (before July 2013):

http://maps.google.com/maps?q=description+(name)+%4046.090271,6.657248

What it did was to show a map with a pin placed at the provided lat/lng coordinates showing up with the given description text.

The plus of this "address format" was to place a pin "adjusted" exactly where you wanted it to be and still provide a meaningful description (like an address which would otherwise not be recognized and/or misplaced via a normal address-only search query).

Same goes for native mobile apps on iPhone/iPad and Android devices. It worked up until Google pushed the new native apps version out (before mid-July 2013), now it doesn't anymore.

Anyone knows if there is a workaround and/or a new or alternate format to obtain the same results with a single link?

Before anyone mentions JavaScript: I already know this can easily be accomplished via JS, but what I'm looking for here is a dead-simple basic link.

Also, I know just providing the coordinates with no description works, but I do need both the coordinates and the description (so basically something that behaves like it did before the update).

EDIT

Further clarification: Static Maps API would not work. I'm looking for a link that brings up the Google Maps Web Application.

EDIT

Just showing a marker at a given lat/lng is trivial (just ?q=lat,lng and you have it). What I want to accomplish is showing a marker ALONG WITH a description in the new google maps webapp.

11
  • ...just so you know, that link worked for me.
    – A.M.
    Commented Jul 18, 2013 at 0:15
  • 1
    @A.M. must be using the old Google Maps then. I can confirm that in the new preview version of maps that the name doesn't show the same way. Commented Jul 18, 2013 at 7:49
  • 1
    So Google is serving up different versions for different places, maybe? In that case, +1 to this question for trying to clear this up for me in advance, from the future. Also, here is a related issue with the "new" (mid-2013) Google Maps: webapps.stackexchange.com/questions/45896/…?
    – A.M.
    Commented Jul 18, 2013 at 11:07
  • @A.M. thanks, but that issue does not seem to be so closely related. It's really about a lab feature that was dropped with the "new" maps. Besides, the coordinates mentioned in the answer to that case are not really those of the marker, but those where the map is centered (the URL itself gets updated when you pan the map around)
    – Sergio
    Commented Jul 18, 2013 at 19:21
  • do you want the description to be displayed in new maps? Commented Jul 19, 2013 at 8:38

4 Answers 4

1

This format works for a specific location, though the label seems to be limited to 1 character:

http://maps.googleapis.com/maps/api/staticmap?center=40.698217,-74.05&zoom=13&size=600x300&maptype=roadmap&markers=color:orange%7Clabel:A%7C40.690217,-74.035&sensor=false

If you really want to show more than one character, you can get around the limitation in a rough way by specifying more points:

http://maps.googleapis.com/maps/api/staticmap?center=40.698217,-74.05&zoom=13&size=600x300&maptype=roadmap&markers=color%3aorange%7Clabel%3aA%7C40.690217,-74.035&markers=color%3agray%7Clabel%3aS%7C40.680217,-74.033&markers=color%3agray%7Clabel%3aO%7C40.680217,-74.030&markers=color%3agray%7Clabel%3aM%7C40.680217,-74.027&markers=color%3agray%7Clabel%3aE%7C40.680217,-74.024&markers=color%3agray%7Clabel%3aP%7C40.680217,-74.021&markers=color%3agray%7Clabel%3aL%7C40.680217,-74.018&markers=color%3agray%7Clabel%3aA%7C40.680217,-74.015&markers=color%3agray%7Clabel%3aC%7C40.680217,-74.012&markers=color%3agray%7Clabel%3aE%7C40.680217,-74.009&sensor=false

You could actually spell out some long words this way, and according to Google, "Static Map URLs are restricted to 2048 characters in size", so you could generate a working link more than 3 times the size of the one just above and have fairly long "labels".


For the second example link, I just changed the first "label" letter to be at the edge of the frame south of the real point, gave every subsequent letter a small longitude change. All of this could be done programmatically if you are trying to generate many of these (you would have to look at the center lat and long and the zoom level to get the latitude of "just inside the frame south of the real point").

I started with the example here, and then verified that you can give a latitude and longitude for the map centre as well as the marker, and that you can set the marker to somewhere not on a feature and have it show up exactly as specified: https://developers.google.com/maps/documentation/staticmaps/#quick_example

(Note that the example given is for the Static Map version of Google Maps. Long labels may be easier to create for other versions.)

1
  • Thanks for your answer, but I was asking about the google maps webapp, not the static maps API (I will add a clarification to my question)
    – Sergio
    Commented Jul 30, 2013 at 23:39
1

We have encountered the same issue with a slightly different URL that we use to show directions between a number of locations. This URL is now broken with or without descriptions:

http://www.maps.google.com?q=52.445365,0.619076+(Description1)+to:52.627721,1.282156+(Description2)+to:52.053842,1.146522+(Description3)

It seems you can do the same thing without descriptions in the new Google Maps, as follows:

http://www.google.com/maps/dir/52.245101,0.716032/52.445365,0.619076/52.627721,1.282156/52.053842,1.146

But the useful ability to give a location a description using only an URL seems to be lost.

0

https://www.google.com/maps/place//@37.7,-122.4,16z/ seems to work - no description though.

2
  • Sorry, but that's not helpful. It's the same as invoking the URL in my question without the description: maps.google.com/maps?q=46.090271,6.657248 But the whole point of my question was for a way to get the description.
    – Sergio
    Commented Mar 20, 2014 at 20:32
  • Thanks anyway, I've added a clarification to the original question to avoid further misunderstandings :)
    – Sergio
    Commented Mar 20, 2014 at 20:39
-2

This should work if its a place that you're looking for:

https://www.google.com/maps/place/[[name]]/@[[lat]],[[lng]],15z
1
  • Can't get this to work. Perhaps you could include some examples in your answer? Commented Jun 27, 2017 at 8:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.