开发者

Bing map - highlight country with a polygon on hover

开发者 https://www.devze.com 2023-03-02 14:43 出处:网络
I\'m using silverlight Bing map control and I want to highlight country / continent after hovering it with mouse cursor.

I'm using silverlight Bing map control and I want to highlight country / continent after hovering it with mouse cursor.

Is there a better way of doing this than just providing coordinates for a polygon ? It's a looot of work if I would like to highlight all countrie开发者_如何转开发s in the world.

I think there should be some sort of ready solution, but I wasn't able to find one.


No, there is no way to highlight a country other than providing your own data - either in the form of coordinates to create a Microsoft.Maps.Polygon, or else overlay your own raster tileset on top of the map with the relevant country highlighted.

In fact, there is not even such such a thing as a globally-agreed list of how many countries there are in the world, let alone where there borders are. See http://en.wikipedia.org/wiki/List_of_territorial_disputes for examples

I think if the Bing Maps API (or Google Maps etc.) were to provide a set of coordinates representing the boundaries of each country, they would inevitably be exposing themselves to unnecessary political bias.


I was searching for some solutions yesterday and I think this is the best solution so far:

http://www.bing.com/community/site_blogs/b/maps/archive/2010/07/13/data-connector-sql-server-2008-spatial-amp-bing-maps.aspx

Using SQL Server spatial data : http://www.microsoft.com/sqlserver/2008/en/us/spatial-data.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消