触摸在 HTC 上无法使用 bing 地图

发布于 2024-10-15 02:39:06 字数 1231 浏览 5 评论 0原文

我们在使用 HTC 手机和触摸地图控制时遇到问题。例如,这适用于 Samsung Focus 或 LG Optima。

在地图上,我们通过调用来显示“领土”:

    MapPolygon shape = new MapPolygon();

shape.Locations = lb.Points;
shape.StrokeThickness = 1;
shape.Tag = lb;
shape.Stroke =

new SolidColorBrush(Colors.Black);

shape.Fill = lb.ColorBrush;
shape.Tag = lb;

_touchTerritoryBehavior =

new TouchBehavior(shape);

_touchTerritoryBehavior.Tap +=

new EventHandler(_touchTerritoryBehavior_Tap);
MyLayer.Children.Add(shape);

其中 TouchBehaviour 与 WP7 培训套件中的内容相同 MyLayer 只是地图 xaml 中的一个图层

<my:Map Name="myMap" CredentialsProvider="{Binding CredentialsProvider}" LogoVisibility="Collapsed"
ZoomLevel="{Binding Zoom, Mode=TwoWay}"
Center="{Binding Center, Mode=TwoWay}" AnimationLevel="None" 
Height="680" Width="480" VerticalAlignment="Bottom" CopyrightVisibility="Collapsed" ViewChangeEnd="myMap_ViewChangeEnd" Margin="0,55,0,0">

<my:Map.Mode>
 <my:RoadMode />
</my:Map.Mode>
<my:MapLayer Name="PinLayer">
</my:MapLayer>
<my:MapLayer x:Name="MyLayer">
  <my:MapPolygon Locations="20,-20 20,20 -20,20 -20,-20" Opacity="0.7" />
</my:MapLayer>

那么为什么这在 H​​TC 手机上不起作用,但在其他 WP7 手机上却完美工作?

We are having an issue with HTC phones and touch on the map control. This works on the Samsung Focus or the LG Optima for example.

On the map we show "territories" by calling:

    MapPolygon shape = new MapPolygon();

shape.Locations = lb.Points;
shape.StrokeThickness = 1;
shape.Tag = lb;
shape.Stroke =

new SolidColorBrush(Colors.Black);

shape.Fill = lb.ColorBrush;
shape.Tag = lb;

_touchTerritoryBehavior =

new TouchBehavior(shape);

_touchTerritoryBehavior.Tap +=

new EventHandler(_touchTerritoryBehavior_Tap);
MyLayer.Children.Add(shape);

Where the TouchBehaviour is the same as what's inside the WP7 Training Kit The MyLayer is simply a layer in the map xaml

<my:Map Name="myMap" CredentialsProvider="{Binding CredentialsProvider}" LogoVisibility="Collapsed"
ZoomLevel="{Binding Zoom, Mode=TwoWay}"
Center="{Binding Center, Mode=TwoWay}" AnimationLevel="None" 
Height="680" Width="480" VerticalAlignment="Bottom" CopyrightVisibility="Collapsed" ViewChangeEnd="myMap_ViewChangeEnd" Margin="0,55,0,0">

<my:Map.Mode>
 <my:RoadMode />
</my:Map.Mode>
<my:MapLayer Name="PinLayer">
</my:MapLayer>
<my:MapLayer x:Name="MyLayer">
  <my:MapPolygon Locations="20,-20 20,20 -20,20 -20,-20" Opacity="0.7" />
</my:MapLayer>

So why would this not work on HTC Phones yet work perfectly on other WP7 phones?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文