【问题标题】:Bing Maps - MapShapeLayer on top of map childrenBing Maps - MapShapeLayer 位于子地图之上
【发布时间】:2015-01-12 11:20:52
【问题描述】:

我在 Windows 8.1 Store App(WinRT、XAML、C#)上使用 Bing Maps SDK

添加到地图组件的子项始终位于地图的 ShapeLayers 集合中添加的项目的顶部。

有没有办法修改 Bing 地图中 MapShapeLayer 的“Z-Index”,使其出现在某些子项之上?

这是一个例子:

XAML:

<bing:Map x:Name="bingMap">
    <bing:Map.Children>
        <bing:MapItemsControl ItemsSource="{Binding SomeItems}">
            <bing:MapItemsControl.ItemTemplate>
                <DataTemplate>
                    ...
                </DataTemplate>
            </bing:MapItemsControl.ItemTemplate>
        </bing:MapItemsControl>
    </bing:Map.Children>
</bing:Map>

C#

this.bingMap.ShapeLayers.Add(mapShapeLayer);

MapItemsControl 将位于 mapShapeLayer 之上,但我想要相反。有什么想法吗?

谢谢

【问题讨论】:

    标签: c# windows xaml windows-runtime bing-maps


    【解决方案1】:

    这是设计使然。如果形状出现在孩子的上方,您将无法与孩子互动。 children 属性通常用于向地图添加自定义图钉或控件,其中大部分用于与用户交互。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多