[Winodows Phone 7控件详解]Map1

1. 注册地图: 

在使用地图之前必须先申请register key https://www.bingmapsportal.com/

将申请到的key填到这个属性,地图才可以正常使用。

CredentialsProvider 属性:填写申请到的Register key。

CredentialsProvider="申请的map id号"

2.设置中心点:

 Center="30.26,120.13"
map1.Center = new GeoCoordinate(30.259497,120.129798);

3.显示模式设置:

Mode="Aerial"

Mode的可取值:Road、Aerial

4.显示缩放按钮:

ZoomBarVisibility 属性:Visible、Collapsed。

 ZoomBarVisibility="Visible" 

改变ZoomLevel可以得到相同的效果

ZoomLevel="15"

5.比例尺显示:

ScaleVisibility 属性:Visible、Collapsed。

ScaleVisibility="Visible"

使用:

<my:Map  Center="30.26,120.13" ZoomLevel="15" Mode="Aerial"  ZoomBarVisibility="Visible" ScaleVisibility="Visible"  Height="601" HorizontalAlignment="Left" Margin="-12,0,0,0" Name="map1" VerticalAlignment="Top" Width="468" />

原文地址:https://www.cnblogs.com/DebugLZQ/p/2431797.html