相关疑难解决方法(0)

MKMapView路线/方向

我发现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)");
}
Run Code Online (Sandbox Code Playgroud)

那么如何将其转换为Objective-C,以便iPhone可以检索它?我知道如何在MKMapView上画一条线我只需要路线的地理位置.

或者也许有一种不同的方式来获得两个地理位置点之间的路线.

请告诉我,

提前致谢.

iphone direction mkmapview map-directions

12
推荐指数
2
解决办法
2万
查看次数

标签 统计

direction ×1

iphone ×1

map-directions ×1

mkmapview ×1