Search code examples
google-mapsgoogle-maps-api-3google-maps-markersgoogle-maps-api-2

URL to dynamic Google Map with path


I want to build a URL to a dynamic map (i.e., to the normal Google Maps interface where you can pan and zoom, rather than an image of a static map) that has a path drawn on it from lat-long coordinates.

Similar questions have been asked with answers that won't solve my problem:

How to obtain a dynamic map from a static map URL? : This guy wanted to add some markers on the map (lines between them would make a path like I want), and was told it was not possible with URL parameters.

How to obtain a dynamic map from a static map URL? : Yes, this guy asked the same question. He was told to change the URL just slightly, but if you follow the URL to the dynamic map, you can see it does not draw what is seen in the static map (e.g., many of the parameters are ignored and stripped).

For KML output, how can I add waypoints between source and destination addresses in a Google Maps URL? : I understand I can ask for driving directions with saddr, daddr, and +to:, but I just want a poly-line path, not driving directions.

I've seen many links to http://mapki.com/wiki/Google_Map_Parameters documenting the URL parameters, but that site has since disappeared, and no other documentation (even the official one) seems to come close to this guy's tedious work.

So is it just not possible? Are driving directions the best I can do?

Thank you for your consideration.


Solution

  • The best you can do you've already found here: http://www.seomoz.org/ugc/everything-you-never-wanted-to-know-about-google-maps-parameters

    Create a KML which contains the desired features(markers, polylines,markers etc.)and pass the URL of the KML-file as q-parameter to google-maps.

    The KML-file may be created on the fly, so you may pass details for the features to your script that creates the KML.