Spiga

使用XAML和SharpMap渲染一幅地图

2006-07-15 11:29 by 马维峰, 2785 visits, 网摘, 编辑

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的方式可以使用,但这种方式的弊端是显而易见的,下一个突破点在什么地方呢?
 
欢迎讨论!
Add your comment

5 条回复

  1. #1楼 edison1024      2006-07-16 00:11
    尼尔森动作好快啊。

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

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

    要在客户端IE上表现的话需要客户端也装有框架3,恐怕目前很难普及。
      回复  引用  查看    
  2. #2楼 IGRE[未注册用户]2006-10-28 11:40
    但adobe已经宣布不在支持SVG VIEWER,那么意味着IE不再有“缺省”的SVG浏览功能了,似乎adobe是为了自己的flex作出的这个决定。而其他浏览器均有内置的SVG浏览功能,但又有多少人在用除IE外的浏览器呢?

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

    楼下的DX10在.NET下与NATIVE比较性能如何?我对DX9.NET的印象不是很好。
      回复  引用    
  3. #3楼 王计平      2007-11-12 04:11
    @edison1024
    框架3的普及肯定没有问题,只是一点时间的问题,因为Windows Vista上就是3了。
      回复  引用  查看    



发表评论

昵称: [登录] [注册]

主页:

邮箱:(仅博主可见)

评论内容:

  登录  注册

[使用Ctrl+Enter键快速提交评论]

0 451272




历史上的今天:
2005-07-15 Go2Map的一个例子
2005-07-15 Go2Map也开放了地图API

相关文章:

相关链接: