URL for multiple markers in Google Maps

Viewed 54794

In a desktop Qt application, I have some GPS coordinates that I'd like to show on a map. My plan is to construct an URL with the coordinates and let a web browser and Google maps or a similar service do the heavy lifting.

After reading some apparently reverse-engineered documentation at

mapki.com slash wiki slash Google_Map_Parameters

I can make it work for a single point, but what's the URL syntax for multiple points?

My best shot so far is to build a string such as this:

http://maps.google.com/?ie=UTF8&q=My+First+Point@59.591,17.82&q=My+Second+Point@59.592,17.82

but that will only show "My Second Point". Is there a better description of the syntax somewhere?


Replacing q= with markers= did not work and the "static map" suggestion below only complained about an incorrect API key.

4 Answers

Several parameters (such as the markers and path parameters) take multiple locations. In those cases, the locations are separated by the pipe (|) character.

https://maps.googleapis.com/maps/api/staticmap?center=boca+raton,+fl+|+deerfied,+FL&zoom=12&scale=false&size=600x300&maptype=roadmap&sensor=false&key=API_KEY&format=png&visual_refresh=true&markers=size:mid%7Ccolor:red%7Cboca+raton,+fl+|+deerfied,+FL" alt="Google Map of boca raton, fl | deerfied, FL
Related