showing specific state of a country on gmap highlighted

只谈情不闲聊 提交于 2019-12-20 04:52:28

问题


I wants to show specific state of a country as highlighted and remaining area in shadow.

I wants to implement like http://www.redfin.com/homes-for-sale#!disp_mode=M&lat=29.770534985365693&long=-95.21904093471284&market=houston&sf=1,2&v=8&zoomLevel=8

I had searched about this and what I understand that, I needs to use overlay for that.

I have one question,

Would I needs to provide lat and lng for borders or it can be achieved by providing some parameter like state code etc.

Any example of showing shadow and highlighted area will be great help.


回答1:


Would I needs to provide lat and lng for borders

You need access to the to the coordinates of the borders, then make them a hole in a polygon that covers the world (or at least the area of interest).

There are options:

  • kml with an inverted polygon

  • import the inverted kml into a FusionTable and display that on a map (doesn't seem to be working anymore)


来源:https://stackoverflow.com/questions/14022368/showing-specific-state-of-a-country-on-gmap-highlighted

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