问题
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 countries in the world.
I think there should be some sort of ready solution, but I wasn't able to find one.
回答1:
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.
回答2:
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
来源:https://stackoverflow.com/questions/5883555/bing-map-highlight-country-with-a-polygon-on-hover