3

我有一个当前正在使用谷歌地图 API 的应用程序。我更喜欢这些地图,我觉得你有更多的谷歌地图选择。问题是,当我给它一个地图地址时,谷歌地图非常不准确,而到目前为止,必应是 100%。我也喜欢 Bings Birds Eye 视图,但这并不重要。我的问题是,我可以使用 Bing API 获取我提供的地址,返回经度和纬度,然后将其提供给我现有的 Google 地图以绘制点。如果是这样,怎么做?我查看了必应地图,但找不到对地址进行地理编码的好方法。以下是我当前的谷歌地图代码

var map;
var directionsPanel;
var directions;

function initialize() {
  map = new GMap(document.getElementById("map_canvas"));
  map.setCenter(new GLatLng(41.1255275,-73.6964801), 15);
  directionsPanel = document.getElementById("route");
  directions = new GDirections(map, directionsPanel);
  directions.load("from: ADDRESS 1 to: ADDRESS 2 ");

          map.addControl(new GSmallMapControl());
    map.addControl(new GMapTypeControl());

}

我想用 Bing 获得的经度和纬度替换 ADDRESS 2

4

4 回答 4

3

正如马特菲利普斯建议的那样,您应该阅读服务条款:http: //www.microsoft.com/maps/product/terms.html

关于组合不同的地图服务有一个限制:

Restrictions on your use: We do have some restrictions on your use of the service. You may not:

...

  • integrate the Bing Maps Platform or any of its content with any other mapping platform;

The Google terms of service are also quite strict and I'd imagine they'd have a similar restriction.

于 2011-02-14T02:54:39.943 回答
1

看起来您应该查看Bing Maps API 许可,看看这是否真的是您想要走的路。如果是这样,那么我建议查看 api 以了解如何做到这一点。

于 2010-11-12T20:49:23.353 回答
1

您可以使用必应位置 API

这是一篇关于如何按地址查找位置的文章。然后,您可以使用纬度和经度提供给谷歌地图。

于 2010-11-12T20:49:40.460 回答
0

AFAIK,Bing Maps Ajax 控件不支持地理编码。您将需要使用他们的 Web 服务:SOAPJSONXML

于 2010-11-12T20:47:06.640 回答