【问题标题】:Best way to get free driving instructions获得免费驾驶指导的最佳方式
【发布时间】:2009-03-23 11:13:28
【问题描述】:
【问题讨论】:
标签:
java
maps
driving-directions
【解决方案2】:
Google maps API.
来自Directions doc的例子:
// Create a directions object and register a map and DIV to hold the
// resulting computed directions
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)");
}