在深度缩放级别下,SurfaceInkCanvas笔划无法正确附加到画布 [英] SurfaceInkCanvas strokes does not attach properly to canvas under deep zoom levels

查看:68
本文介绍了在深度缩放级别下,SurfaceInkCanvas笔划无法正确附加到画布的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的申请中我是使用SurfaceInkCanvas在ArcGIS API for WPF中找到的Map控件上启用徒手绘图。为了允许用户在整个地图上绘制
,无论当前缩放级别如何,SurfaceInkCanvas都封装在包含整个地图的ViewBox中。此视图框再次包含在ElementLayer中,如下所示:

<esri:ElementLayer>
   <esri:ElementLayer.Children>
      <Viewbox esri:ElementLayer.Envelope="-20037507.0671618, -20089868.8804086, 20037507.0671618, 20091868.8804086">
         <s:SurfaceInkCanvas x:Name="MainInkCanvas"  />
      </Viewbox>
   </esri:ElementLayer.Children>
</esri:ElementLayer>

绘图功能运行良好,但我遇到了以下问题:当地图放大到非常低的水平时,绘制笔画
不会"附加"适当地再到SurfaceInkCanvas。下面是一个图像的链接,说明当我在深度缩放级别下绘制时笔画最终会如何显示:




有谁知道为什么笔画会像这样结束,我怎么能避免呢?

Does anyone know why the strokes end up like this, and how I can avoid it?

推荐答案

你好,

如果你想让你的storke与之同步缩放级别,因为它通常应该是绘图点没有更多的意义,如果他们没有反映在我的脑海中的缩放级别,你需要绘制多边形并将它们作为MapLayer附加到你wpf
地图控件。

If you want your storke gets in synchrone with the zoom level, as it should normally be otherwise the drawing point has not more meaning if they do not reflect the zoom level in my mind, you need to draw polygone and attache them as a MapLayer to you wpf map control.

执行此操作后,您绘制的点将附加到地图上并进行缩放roperty基于缩放级别。

Doing this you drawn point will be attached to the map and be scaled property based on zoom level.

参考:

http://msdn.microsoft.com/en-us/library/hh868034.aspx

希望这有助于支付¥b $ b视为
serge

Hope this helps
regards
serge


这篇关于在深度缩放级别下,SurfaceInkCanvas笔划无法正确附加到画布的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆