openmaptiles / positron-gl-style

Positron GL style using OpenMapTiles
https://openmaptiles.github.io/positron-gl-style/
Other
96 stars 55 forks source link

Missing bridges after z11 #3

Closed ianthetechie closed 7 years ago

ianthetechie commented 7 years ago

missing bridge

After z11, major roads shift to the new style with more elaborate casing and fill variety. It looks like tunnels are properly rendered (from a reading of the style; I don't happen to know an example offhand). However, bridges are never rendered after this point so you get some rather funny looking gaps like this one in Downtown Erie, PA.

I'm submitting this as an issue rather than a pull request because I have an idea for a fix, but I'm not sure it's the best way. For a quick fix for my application, I have added bridge-specific layers with a slightly thicker casing as shown in the screenshot below. What I'm not sure about is the correct way to do z-order. I found that putting the bridge entries after railroad layer (so that they render above railways) worked, but I'd like to make sure this is the best way before I send a PR.

bridge example

lukasmartinelli commented 7 years ago

I'm submitting this as an issue rather than a pull request because I have an idea for a fix, but I'm not sure it's the best way. For a quick fix for my application, I have added bridge-specific layers with a slightly thicker casing as shown in the screenshot below. What I'm not sure about is the correct way to do z-order. I found that putting the bridge entries after railroad layer (so that they render above railways) worked, but I'd like to make sure this is the best way before I send a PR.

There sadly is as of now no correct way to do 100% correct z-order (will be solved with future Mapbox GL JS advancements) however your approach is exactly what works best for most cases in a style.

Would love a PR :smile: Thanks for the issue.

stirringhalo commented 7 years ago

I'm curious which mapbox-gl-js enhancements are roadmapped to make this easier? I've done it, but it requires doing it in multiple layers and encoding the layer multiple times to draw it multiple times with the correct stacking.