1
현재 Google지도 API를 사용하여 길 찾기를 렌더링하고 있습니다. 기술적 인 측면 모두에서 Google지도에서 잘못된 방향을 제안합니다.
잘 작동합니다 :var $canvas = $element.querySelector('#map-canvas');
vvar map = new maps.Map($canvas, {
center: new maps.LatLng(52.46004869999999, 13.37898690),
mapTypeId: maps.MapTypeId.ROADMAP,
zoom: 14
});
var route = {
travelMode: google.maps.TravelMode.BICYCLING,
origin: new google.maps.LatLng(52.455833, 13.322948),
destination: new google.maps.LatLng(52.459281, 13.356367),
};
new google.maps.DirectionsService().route(route, function(body) {
var display = new google.maps.DirectionsRenderer();
display.setMap(map);
display.setDirections(body);
});
불행하게도 제안 된 경로가 절대적으로 쓰레기입니다. A에서 B로 직접가는 대신 도시를 떠납니다 ...
이 기능은 maps.google.com과 잘 작동하지만 API가 아닌 이유는 무엇입니까? 올바른 결과를 얻으려면 무엇을 변경해야합니까?
보도
대답 주셔서 감사합니다! 내가 원산지와 목적지의 유형을 거리 주소로 설정할 수있는 곳을 이해하지 못합니까? 지오 코드 응답에 street_address 유형의 결과가 없습니다 (기차역 만 다른 결과는 전혀 일치하지 않습니다) –
http://gmaps-samples-v3.googlecode.com/svn/trunk/geocoder/v3-geocoder- tool.html # q % 3D52.455833 % 2C13.322948, 두 번째 결과는 Berlinickestraße 16A이고 street_address로 설정된 유형이 있습니다. –