创建Bing Maps Key
在使用Bing Maps Apis之前,我们必须要有Bing Maps Key
。
- 前往Bing Maps Dev Center
- 可以通过
Microsoft Account
登陆,然后创建Bing Maps Account
- 点击
My account
- 选中
My Keys
- 点击
Click here to create a new key.
- 填入必要的信息
Application name
程序名称
Key type
Key的类型
Application type
程序的类型
- 点击
Create
- 在生成的界面复制Key
参数说明
BingMapsKey
Bing Maps Keys(密钥)
point
地球上由纬度和经度指定的点
- 坐标是用逗号分隔的值
- 顺序指定: 纬度、经度
- 示例:
double[-90, +90][-180,+180]47.610679194331169,-122.10788659751415
根据经纬度查位置信息
1
| http://dev.virtualearth.net/REST/v1/Locations/47.64054,-122.12934?o=xml&key={BingMapsKey}
|
获取静态地图
1
| http://dev.virtualearth.net/REST/v1/Imagery/Map/Road/47.619048,-122.35384/15?mapSize=500,500&pp=47.620495,-122.34931;21;AA&pp=47.619385,-122.351485;;AB&pp=47.616295,-122.3556;22&mapMetadata=1&o=xml&key={BingMapsKey}
|