使用XAML和SharpMap渲染一幅地图

SharpMap作者的Blog上新贴了一个帖子,是关于使用XAML渲染地图的,正好前两天和Edison聊到这个话题,呵呵。

原文如下:

I was just reading a few articles on XAML - Microsoft new UI language for rendering vector content and user interfaces - when it hit me that this probably can get you much further in web mapping interaction than SVG can. XAML is part of the "Windows Presentation Foundation" a part of .NET Framework 3.0 

My first attempt to generate XALM was done by creating a new renderer for SharpMap, and below you can see my first results in XamlPad. The data here has been created based on a SharpMap map by my quick'n'dirty XamlRenderer for SharpMap. 

  

All it takes with the new renderer is initializing the new renderer with your map, and request a new map:

SharpMap.Xaml.Renderer XamlRenderer = new SharpMap.Xaml.Renderer(map);

string xaml = XamlRenderer.GetMap(); 

If you zip the generated XAML file you even get a 20% reduction over a PNG image. 

Next step is to add interaction like zooming, querying etc… 

Download XAML for the above worldmap (261,36 KB)

 
感觉使用XAML是不是和SVG类似,至少从技术思路上来看,那么,对于大数据量,海量数据,根据空间索引来控制输出范围怎么解决?目前对于可以达到公众型Web地图效率的,估计只有GMap的方式可以使用,但这种方式的弊端是显而易见的,下一个突破点在什么地方呢?
 
欢迎讨论!

posted on 2006-07-15 11:29 马维峰 阅读(3217) 评论(5) 编辑 收藏

评论

#1楼 2006-07-16 00:11 edison1024      

尼尔森动作好快啊。

框架3发布后一直想尝试下WPF的渲染速度。不过我想的是在服务端进行实时渲染。硬加速的DX10性能肯定比传统的GDI,GDIPLUS等软加速要强上许多。

XAML其实和SVG很相似,都是用XML来定义图形。但其有框架的支持可编程模型恐怕就不是SVG+脚本可比拟咯。

要在客户端IE上表现的话需要客户端也装有框架3,恐怕目前很难普及。
 回复 引用 查看   

#2楼 2006-10-28 11:40 IGRE[未注册用户]

但adobe已经宣布不在支持SVG VIEWER,那么意味着IE不再有“缺省”的SVG浏览功能了,似乎adobe是为了自己的flex作出的这个决定。而其他浏览器均有内置的SVG浏览功能,但又有多少人在用除IE外的浏览器呢?

MS IE7支持SVG的可能性似乎也不大,毕竟XAML已经出现了。

楼下的DX10在.NET下与NATIVE比较性能如何?我对DX9.NET的印象不是很好。
 回复 引用   

#3楼 2007-11-12 04:11 王计平      

@edison1024
框架3的普及肯定没有问题,只是一点时间的问题,因为Windows Vista上就是3了。
 回复 引用 查看   

公告

昵称:马维峰
园龄:7年2个月
粉丝:45
关注:0

统计

  • 随笔 - 345
  • 文章 - 24
  • 评论 - 1665

搜索

 

常用链接

我的标签

随笔分类(437)

随笔档案(350)

文章分类(34)

文章档案(24)

GIS站点

个人链接

积分与排名

最新评论

阅读排行榜

评论排行榜

推荐排行榜