问题
If a place is selected on Google Maps, either from the map itself or from the dropdown in a search, on Google Maps, the url looks like this:
https://www.google.com/maps/place/Starbucks/@55.6767263,12.5666291,17z/data=!3m1!4b1!4m2!3m1!1s0x4652530e00cbee81:0x5e1ce2a9639f9705
After reading this blog article about the URL parameters, the /data part contains a wide range of information, among them is the Feature ID of the selected place. From the url example it's 0x4652530e00cbee81:0x5e1ce2a9639f9705.
I can look up the Feature ID on Google Mapmaker like this:
http://www.google.com/mapmaker?gw=39&fid=0x4652530e00cbee81:0x5e1ce2a9639f9705
There it displays the location with no problem.
Is it possible to also use the Feature ID in Google Maps API and display the location?
回答1:
I don't believe you can use Feature ID to display locations in Google Maps API. Based on the Data.Feature class, it seems to be more used for styling and data layers.
来源:https://stackoverflow.com/questions/35152580/use-feature-id-from-google-maps-url-in-google-maps-api