It is not clear what result you want. Do you want the line width to remain the same regardless of scaling, or do you want the line to be the same width as the tracks that the map view displays regardless of the zoom level?
To keep the line width somewhat constant no matter what, try dividing by scaling:
CGContextSetLineWidth(context, (30/zoomScale));
To make the line the same as the roads, use MKRoadWidthAtZoomScale:
CGContextSetLineWidth(context, MKRoadWidthAtZoomScale(zoomScale));
You can also apply additional scaling to the width of the road if you want:
CGContextSetLineWidth(context, 1.5*MKRoadWidthAtZoomScale(zoomScale));
source
share