我发现Google Maps API支持通过以下方式获取方向:
var map;
var directionsPanel;
var directions;
function initialize() {
map = new GMap2(document.getElementById("map_canvas"));
directionsPanel = document.getElementById("my_textual_div");
map.setCenter(new GLatLng(49.496675,-102.65625), 3);
directions = new GDirections(map, directionsPanel);
directions.load("from: 500 Memorial Drive, Cambridge, MA to: 4 Yawkey Way, Boston, MA 02215 (Fenway Park)");
}
那么这个怎样才能被翻译成Objective-C,以便iPhone可以检索到它?我知道如何在MKMapView上画一条线,我只需要路线的地理位置。
或者也许有另一种方法可以获取两个地理位置点之间的路径。
请告诉我,
先行致谢。