I am trying to draw a tile overlay and a polyline on a google map. I would like the polyline to appear on top of the tile overlay so that it can be seen. It is currently drawn under the tile overlay and is fading, my code is as follows:
NBUrlTileProvider tileProvider = new NBUrlTileProvider(url, 256, 256);
TileOverlayOptions tileOverlayOptions = new TileOverlayOptions()
.tileProvider(tileProvider)
.fadeIn(true);
mMap.addTileOverlay(tileOverlayOptions);
PolylineOptions polyLineOptions = new PolylineOptions();
polyLineOptions.width(5).geodesic(true).color(Color.rgb(255, 0, 255));
polyLineOptions.add(location1);
polyLineOptions.add(location2);
polyLineOptions.add(location3);
mMap.addPolyline(polyLineOptions);
Any help would be greatly appreciated, I thought that the polylines would just be drawn on top of the default tiles, is there anything extra I need to add?
source
share