Search code examples
androidskmaps

Skobbler polyline doesn't draw line


I am using skobbler sdk 2.2 and when I draw a polyline I can't see the inner line.

This is the polyline code:

route.setNodes(routeOverlayPoints);
route.setColor(new float[] { 1f, 0f, 0f, 1f });
route.setOutlineColor(new float[] { 0f, 0f, 1f, 1f });
route.setLineSize(5);
route.setOutlineSize(10);
route.setOutlineDottedPixelsSolid(10);
route.setOutlineDottedPixelsSkip(1);
mapView.addPolyline(route)

I'm pretty sure that I saw the red line at one point (zooming in/out, rotating), but I wasn't able to reproduce it. Any ideas?


Solution

  • As there is nothing better so far, I am answering my question. Adding the polyline before the map surface is created causes the issue. So if you trigger the polyline drawing with onSurfaceCreated() everything works as expected.