Search code examples
androidgoogle-mapsroutesbus

Drawing bus route to Google map


I want to make a public transportation application for Android. First problem I'm facing is how to create a bus route and show it to users.

I have a list of bus stops coordinates. I understand, I have to generate encoded polyline which I did. Used this utility here. How can I only show the stops in this route, because I added way more points to the map than bus stops, because I want to follow the road correctly. If I add only bus stops, then it connects them directly which I do not want to achieve.

If anyone has done it or have knowledge to do it, please guide me to the right direction.

Regards, evilone


Solution

  • You could add a different list of overlayItems to indicate bus stops. It seems to me you did the most difficult part of your mapping related stuff in your app already, adding overlayItems is gonna be quite easy.

    Stéphane