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

Hi,

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 openstreetmap.org 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.

Thanks!
J Chen

openstreetmap.org

rendered by my code

screenshots are NOT visible now.

Service:

https://onedrive.live.com/redir?resid=2DBADB119EBC2F05!12589&authkey=!AJ2K80SyIRh5cHU&v=3&ithint=photo.JPG

https://onedrive.live.com/redir?resid=2DBADB119EBC2F05!12590&authkey=!AD6eoo3UfjJvlsc&v=3&ithint=photo.JPG

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.