Render Question: How to remove the road edge at intersection point


I’m trying to render osm by myself and I met a problem that I couldn’t solve well. I’m hoping I can find some help here.

Below are 2 screen shots of a same location. The left one is from while the right one is rendered by my code. You can see as I marked by red circle that the left one doesn’t have road edge at the junction point, but the right one does. So how can I remove the edge at junction points? Anyone can share some idea?

Btw, I render the road edge by rendering the “highway” twice. One with wider stroke and the other with thinner stroke.

J Chen

rendered by my code

screenshots are NOT visible now.


OSM maps typically render the casing (the “edge” lines) for all roads on that layer first. So in your case, render all the highways with the wider stroke, then render them again with the thinner stroke. That gets rid of this kind of artifact.