Use Feature ID from Google Maps url in Google Maps API

流过昼夜 提交于 2019-12-22 17:58:09

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!