开发者

freeware .net map component?

开发者 https://www.devze.com 2022-12-15 04:53 出处:网络
I\'m looking for a .NET chart component that can display a world map, with the option to shade different countries.

I'm looking for a .NET chart component that can display a world map, with the option to shade different countries.

Are there any freeware products that do this?

Thi开发者_开发技巧s needs to be "offline" so any Google type API will not be possible.


I'm thinking that one approach would be to use a SVG world map and dynamically edit its code (and reload the picture) to show highlights.

SVG is an XML format and you can use regular style sheets to change the color of individual objects, if they are defined properly. In the case of the world map on Wikipedia (that you can freely use), countries are defined like

<path class="landxx ca" d="M 614.43303,201......." id="path4906"/>

so, in your code, you can just add to the style section something like

.ca { fill: red; }

and you're done.

[cheers to Simonw for the SVG enlightenment]


The Microsoft Silverlight Toolkit is free and works offline. You could develop your own world map with it.

Note: your users would need Silverlight installed.

0

精彩评论

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

关注公众号