We have a Google map library to show multiples markers in cluster.
I have two questions:
I dont't know if I understood your question correctly, but I'll try to answer anyway. You can create multiple polylines and add to map from the JSON response from google maps direction API. This way you can add several routes in a single map.
As far as I understood the second question, you want the cluster marker to give details of the routes you are drawing. For that, I guess you can cluster the points returned by the API and use custom marker clusters to show the info you want.
Hope it helps
-Edit- If you want to draw routes in an Android app, you don't get any DirectionRenderer you can use. You need to render the routes using Polylines. That's why I have mentioned creating polylines in the answer above. As a response to the Direction request, you get a JSON containing several coordinate points which can be joined by drawing a polyline through them. You can have multiple such polylines on a map (from any point to any point). Case 1: you want 2 routes from Bombay to Goa, set the alternatives parameter to true. Case 2: you want two different routes, Bangalore to Bombay, Goa to Delhi, make two different requests to the API. You'll get two different routes and draw them on map.
For your second question, since there is no inbuilt clustering for routes (polylines), you have to code the logic of cluster icons showing up in the map. For getting the current zoom level, use the following.
GoogleMap map;
float zoom = map.getCameraPosition().zoom;
For showing and hiding polylines
Polyline line = map.addPolyline(new PolylineOptions()
.add(new LatLng(51.5, -0.1), new LatLng(40.7, -74.0))
// multiple points that you get from the response of directions API
.width(5)
.color(Color.RED));
//your logic for visibility
if(zoom<=5){
line.setVisible(true);
}
I couldn't find any way in the API to hide the cluster Icon using code. I guess it should hide itself after certain zoom level.