how do i decode/encode the url parameters for the new google maps?

后端 未结 3 587
栀梦
栀梦 2020-12-08 17:27

Im trying to figure out how to extract the lat/long of the start/end in a google maps directions link that looks like this:

https://www.google.com/maps/preview#!data

3条回答
  •  离开以前
    2020-12-08 17:54

    Looks like the developer tools from current browsers (I am using Chrome for that) can give you a lot of info.

    Try the following:

    • Go to Google Maps with Chrome (or adapt the instructions for other browser);
    • Open Developer Tools (Ctrl + Shift + I);
    • Go to Network tab. Clear the current displayed values;
    • Drag the map until some url with encoded data appears;
    • Click on that url, and then go to the Preview sub-tab;

提交回复
热议问题