Googlemap highlighing specific country on map
Is there a way to draw lines around th开发者_开发问答e countries and onmouseover changing the background-color of that country on map.
Thanks.
The boundaries of the countries are not provided by the API directly. However, if you find a publicly available data source and you can load each polygon in JavaScript, this should be quite easy to manage.
I'm working on such component now, but I'm using world map in SVG format, here it is. It is very easy to deal with it. Every country is DOM element and you can do what you want with it, change colors of outline or background, bind some event handlers and so on. But the main problem with such method is that IEs don't support SVG without plugins, but you can use VML instead for them. Also you can use some flash component:
- http://www.backspace.com/mapapp/
- http://www.flashmaps.com/products/areaselector/world/?gclid=CLC9lNzP96ICFQO7ZwodAQ3Pgw
精彩评论