I know that we can change the color of the polyline using "polylineOptions.color (YOUR_COLOR)"; bit can you set the form on it? (I would like for me to have a blue frame and be white inside, if the route should be completed, and if it is completed, set the color to blue - no more than the border)
This is what I have so far, I call this function 2 times, once for the completed path, and then for the path to be completed:
public void createProgressRouteOnMap( ArrayList<LatLng> route, boolean done){
if(done) {
if(polyline != null){
polyline.remove();
}
}else{
if(polyline2 != null){
polyline2.remove();
}
}
PolylineOptions polyLineOptions = new PolylineOptions();
polyLineOptions.addAll(route);
polyLineOptions.width(10);
if(done){
polyLineOptions.color(getResources().getColor(R.color.background));
}else{
polyLineOptions.color(getResources().getColor(R.color.blue_route));
}
if(mMap == null){
setUpMapIfNeeded();
}
if(done) {
polyline = mMap.addPolyline(polyLineOptions);
}else{
polyline2 = mMap.addPolyline(polyLineOptions);
}
}
source
share