Google Code Playground なんか日本語入れると動かないよ
Google Code Playground 便利かなと思ったんだけど
↓のソース start と end に日本語入れると動かない。(エラーは出ないけど)
http://www.geocoding.jpから緯度経度検索してLatLngで突っ込むしかないの??
(英語で書いても大丈夫だとおもうんだけどそっちのほうがヒットしなさそうで難しそうだし)
function initialize() { var map = new google.maps.Map(document.getElementById('map-canvas'), { center: new google.maps.LatLng(36, 140), zoom: 8, mapTypeId: google.maps.MapTypeId.ROADMAP }); google.maps.event.addListener(map, 'click', function() { alert("test"); }); var start = "tokyo"; //new google.maps.LatLng(35.689488, 139.691706); var end = "kyoto"; //new google.maps.LatLng(35.011636, 135.768029); var request = { origin:start, destination:end , travelMode: google.maps.DirectionsTravelMode.DRIVING, }; var directionsService = new google.maps.DirectionsService(); var directionsDisplay = new google.maps.DirectionsRenderer(); directionsDisplay.setMap(map); directionsService.route(request, function(result, status) { if (status == google.maps.DirectionsStatus.OK) { directionsDisplay.setDirections(result); } }); }