SharpGIS博客翻译2006年7月:使用XAML来渲染地图
2007-03-28 21:17
645 查看
Using XAML for rendering maps [原文] [翻译] [作者:Clark]
Using XAML for rendering maps
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
最近读了几篇关于XAML(微软用于渲染矢量图形和用户界面的新一代UI语言)的文章,我想它可能比SVG在WEB应用程序的交互上更有前途。XAML 是.NET Framework3.0中"Windows Presentation Foundation"的一部分。
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.
我开始尝试为SharpMap写一个新的renderer用来生成XAML,下图是在XamlPad查看生成的结果。这些数据是基于SharpMap的XamlRenderer生成的,代码有点混乱。
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…
你只需要用自己的地图实例化一个XamlRenderer,然后请求地图就可以得到这些数据,代码如下:
SharpMap.Xaml. Renderer XamlRenderer = new SharpMap.Xaml. Renderer (map);
string xaml = XamlRenderer.GetMap();
如果压缩一下生成的XAML文件,大约有20%的压缩率比PNG图片的压缩比还大。
下一步就是加入与其的交互了,如放大、查询等等。。。
Download XAML for the above worldmap (261,36 KB)
Using XAML for rendering maps
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
最近读了几篇关于XAML(微软用于渲染矢量图形和用户界面的新一代UI语言)的文章,我想它可能比SVG在WEB应用程序的交互上更有前途。XAML 是.NET Framework3.0中"Windows Presentation Foundation"的一部分。
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.
我开始尝试为SharpMap写一个新的renderer用来生成XAML,下图是在XamlPad查看生成的结果。这些数据是基于SharpMap的XamlRenderer生成的,代码有点混乱。
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…
你只需要用自己的地图实例化一个XamlRenderer,然后请求地图就可以得到这些数据,代码如下:
SharpMap.Xaml. Renderer XamlRenderer = new SharpMap.Xaml. Renderer (map);
string xaml = XamlRenderer.GetMap();
如果压缩一下生成的XAML文件,大约有20%的压缩率比PNG图片的压缩比还大。
下一步就是加入与其的交互了,如放大、查询等等。。。
Download XAML for the above worldmap (261,36 KB)
相关文章推荐
- SharpGIS博客翻译2006年7月:使用XAML来渲染地图
- SharpGIS博客翻译2005年6月:使用.NET来渲染地图
- SharpGIS博客翻译2005年6月:使用.NET来渲染地图
- SharpGIS博客翻译2006年7月:在SharpMap中使用即时坐标变换
- SharpGIS博客翻译2006年7月:在SharpMap中使用即时坐标变换
- SharpGIS博客翻译2006年7月:在SharpMap中增加饼图
- SharpGIS博客翻译2006年7月:在SharpMap中增加饼图
- SharpGIS博客翻译2006年9月:在local live地图上叠加自己的数据
- SharpGIS博客翻译2006年9月:在local live地图上叠加自己的数据
- SharpGIS博客翻译2006年5月:扩展微软 SQL Server 的空间功能
- SharpGIS博客翻译:总结回顾及新活动开始倡议
- 使用XAML和SharpMap渲染一幅地图
- SharpGIS博客翻译2006年8月:微软SQL Server空间扩展模块工程
- SharpGIS博客翻译2006年5月:扩展微软 SQL Server 的空间功能
- SharpGIS博客翻译2006年12月:ArcGIS Server项目团队博客
- SharpGIS博客翻译2006年11月:微软地球
- SharpGIS博客翻译2006年8月:微软SQL Server空间扩展模块工程
- SharpGIS博客翻译2006年11月:微软地球
- SharpGIS博客翻译2006年12月:ArcGIS Server项目团队博客
- GIS的学习(十九)Geoserver使用添加,删除,查询地图中的POI