문제

i want to just find a shortest path between the location on map. we have to pass the location's geopoint then click the button to get direction. it will show the shortest path like a blue line. how to do this? i search about this. many of them import a package com.google.googlenav.*;. where i have to get this? Any Idea????

Edit:got downloaded the Cloudemade API. how to draw the lines between the points.

도움이 되었습니까?

해결책

이것은 나를 위해 작동합니다 :

function showOptional(commandName) {
   $('.Optional').hide();  // clear out optional inputsinputs
   $('.Optional.' + commandName).show();  // show relvant 
}

showOptional('Command1');​
.

fiddle : http://jsfiddle.net/syxum/1/1//A>


그러나 원래 접근 방식은 http://jsfiddle.net/syxum/2/2/


방금 성능 테스트 및 다음 코드는 원래 접근 방식보다 빠르고 위의 제안보다 빠릅니다.:

function showOptional(commandName) {
   $('.Optional').hide().filter('.' + commandName).show();
}
.

다른 팁

Google removed this functionality from their Android Google Maps SDK so you will have to use some other api to get directions between two points. Once you have the waypoints you will need to create an Overlay class and in the draw() method, use the Path class to draw a path between the points.

its the working example. fulfills all my needs.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top