PDA

View Full Version : [Android] SKPolyline and other Objects



PatrickZenker
08.01.2016, 19:56
Hey,

iam adding a line to the map via


SKPolyline polyline = new SKPolyline();
List<SKCoordinate> nodes = new ArrayList<SKCoordinate>();
nodes = new ArrayList<SKCoordinate>();
nodes.add(new SKCoordinate(edge.getFrom().getY(), edge.getFrom().getX()));
nodes.add(new SKCoordinate(edge.getTo().getY(), edge.getTo().getX()));
polyline.setNodes(nodes);
polyline.setColor(new float[]{0f, 0f, 0.5f, 1f});
polyline.setOutlineColor(new float[]{0f, 0f, 1f, 1f});
polyline.setOutlineSize(1);
polyline.setIdentifier(id);
polyline.setOutlineDottedPixelsSolid(1);
polyline.setOutlineDottedPixelsSkip(1);
mapView.addPolyline(polyline);

I get a very thick line at the map at maximum zoom level (19) (see attachment) beside my current position with heading from the magnetometer.

But at the map i can see very thin building edges. Is there a way to get such lines? Or is it possible to increase the maximum zoom level?

Best regards,
Patrick

PatrickZenker
14.01.2016, 16:22
Just forgot two lines:


polyline.setLineSize(1);
polyline.setOutlineSize(0);

Adela_Silvia
19.01.2016, 10:51
Thanks for updating the thread with the solution.