开发者

Google Directions on mobile applications, walking distance between two points - minimize response

I'm working on a mobile app and I would like to calculate the distance between two points using the Google Directions API (http://code.google.com/apis/maps/documentation/javascript/services.html#Directions).

I have a list of places and I would like to show this list ordered by distance (from the u开发者_StackOverflow中文版ser position). This can be done performing a request using Google API, look at the following post, there is a working example: Android: how to get the walking distance between two geo coordinats?).

My questions:

1) Is it possible to calculate the distance from one origin (my current position) to several points (places) using just one request?

2) Is it possible to reduce the size of the response (in order to reduce network traffic)? I just need distance + required time. I would like tho show the map only when the user click the item in the list.

Many thanks in advance for your help.

Mauro


You should look at google.maps.DirectionsLeg and this example.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜