How to highlight a region on Google Maps

℡╲_俬逩灬. 提交于 2020-01-01 02:18:07

问题


How can I highlight/cover a region or multiple regions with different colors (for example 3 US states), using google maps polygon arrays? I found a tuto on google code about how to draw a polygon but it's not giving detailed information.

Thank you for your help.


回答1:


This documentation on Google is about as straight forward as you can get.

http://code.google.com/apis/maps/documentation/javascript/overlays.html

View the source of this page. Copy and paste the code into your own page and start from there.

http://code.google.com/apis/maps/documentation/javascript/examples/polygon-simple.html

In the example above you simply need to make more than one instance of bermudaTriangle and name it something else and add it to the map.



来源:https://stackoverflow.com/questions/6431855/how-to-highlight-a-region-on-google-maps

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