Google maps api marker info in sidebar

て烟熏妆下的殇ゞ 提交于 2019-12-12 03:17:13

问题


I'm currently creating an interactive web map using Google Maps Javascript API version 3. I'm not sure if this is possible but I would like to create a series of map layers consisting of different kml files that could be toggled from the side bar. I would also like to be able to access the individual points within the kmls so that when the user clicks on a particular point, photos, text etc. can be loaded outside the map window...

Any ideas on how to accomplish this? I've been searching for a while and only found ways of configuring the infowindow which I personally find unattractive...


回答1:


There is a way to load KML into a google maps application natively, there is actually a pretty good example of how this is done here:

http://gmaps-samples-v3.googlecode.com/svn/trunk/layers/layers.html

One trick I will mention is that since the KML is downloaded to Google's servers in order to be rendered on the map, it must exist on a public facing web server somewhere, Google won't be able to access it from your local machine.




回答2:


I found this tutorial which seems like it'll do the trick!



来源:https://stackoverflow.com/questions/9713860/google-maps-api-marker-info-in-sidebar

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