0

Is it possible to get the full URL of a map and then generate maps from said URL with the Google Map API V3? It seems like this should be straight forward but I have not found any way to do so. I have no problems getting and generating basic URLs like the to and from type directions, but this doesn't cover my needs in a lot of cases. For instance, when directions are modified by dragging the route, the URL becomes much more intricate as seen with the browser version of Google Maps and I need to copy the full string and generate the map again with that URL.

An example of the full URL with modified routes looks like: https://www.google.com/maps/dir/43.7447677,-103.7949526/42.2015221,-103.2676089/@42.1627848,-102.7149569,7.45z/data=!4m9!4m8!1m5!3m4!1m2!1d-101.8968136!2d43.0988354!3s0x8779521542794cd5:0x9ddd898e98403dcc!1m0!3e0

Using the short URLs would be ideal, but I see that there is an API for that which I will reference once this initial functionality is working if there's not a way to simply pull and utilize the short URLs off the bat.

  • related question: [how do i decode/encode the url parameters for the new google maps?](http://stackoverflow.com/questions/18413193/how-do-i-decode-encode-the-url-parameters-for-the-new-google-maps) – geocodezip Feb 18 '16 at 18:48
  • Based on these comments, it seems like the notion is that there's not a way to simply pull or utilize a URL and rather I need to parse the data myself? I'm surprised that there isn't a much simpler way to do this but if that's how it needs done then that's how it needs done... – donutsorelse Feb 19 '16 at 16:29
  • related blog post: [Google maps new !-style embed format](http://andrewwhitby.com/2014/09/09/google-maps-new-embed-format) (fixed formatting of comment) – geocodezip Feb 19 '16 at 17:32
  • There is no built in way (at least at present) to do what you want. You could create an enhancement request in the [issue tracker](https://code.google.com/p/gmaps-api-issues/) (but don't expect it to be implemented quickly, if at all). You probably have to parse the URL yourself, but be aware, this is not documented officially anywhere I know of, so it may change at any time... – geocodezip Feb 19 '16 at 17:36
  • Ok, thanks for the responses. I think you're probably right. It seems like even the analysis of the url format within these articles doesn't do much for actually parsing or generating the more complicated URLs like in the case of modified routes, unfortunately. Regardless, I'll leave the question open a bit longer in hopes of a miracle worker who knows of a relevant parsing library or some such but if there's no word within a couple of days I'll resolve the question. – donutsorelse Feb 19 '16 at 21:39

0 Answers0