Android Question Google map Direction for more than 40 address

yfleury

Active Member
Licensed User
Longtime User
Is it a way to make direction and draw route (polypoints) for more 40 address?
 

drgottjr

Well-Known Member
Licensed User
Longtime User
google maps directions api has a limit of 25 waypoints per request, so you'd need to string 2 requests together (or however multiples of 25 it takes to complete your route. sorry, not sure what you mean by polypoints in this context.
 
Upvote 0

yfleury

Active Member
Licensed User
Longtime User
Thanks for your response.
I work like you said. But
I want to draw polygons from point A to point to point C ... etc. Is it possible to do it without using Google direction api?
 
Upvote 0

drgottjr

Well-Known Member
Licensed User
Longtime User
i don't believe there is an api to do that. it's certainly doable but i believe you're going to have to do a lot of the work yourself:
1) draw a number of polygons and put them on the map. easy.
2) find the center of each polygon and make that a waypoint. should be easy.
3) calculate the directions. feed to google directions api (taking into account the 25 waypoints limit per request). easy.
4) lay the route over the polygons. easy.

the polygons and the directions are 2 separate routines. when you lay one over the other, it will appear as if you're giving directions from a polygon. easy.

sorry, i forgot it sounds like you don't want to use google's directions api. find another (there are a number out there). they will all give you the route in a form that you can feed to google maps called a polyline encoded string. if google maps complains, then you'll have to use its directions api.
 
Last edited:
Upvote 0

yfleury

Active Member
Licensed User
Longtime User
Well, then will use Google direction api. I don't want complicate my life than now.šŸ˜Ž
 
Upvote 0

yfleury

Active Member
Licensed User
Longtime User
Osrm have some limitation. My app will need intensive Directions api. I will stay with google.
 
Upvote 0

TILogistic

Expert
Licensed User
Longtime User
My APP also has many requests and I have not had any problems with use.

If desired, it allows you to have your own service server.
 
Upvote 0

TILogistic

Expert
Licensed User
Longtime User
note:

Requests for our mobile APP are made to an intermediate server that analyzes the geocoding pages and Free Routes.

we have thousands of requests from our mobile app users
 
Upvote 0
Top