Open soupman99 opened 8 years ago
Here's an example of a vector tile viewer we're using on http://map.project-osrm.org/debug/#12.21/52.5233/13.3987: https://github.com/danpat/osrm-tile-viewer
@daniel-j-h that was a HUGE help. Thanks for the link. Which brings up another question. Is there a way to filter streets based on the direction of traffic flow? I see that this is being used to filter the street color based on the speed
property.
"filter": ["all",
["==", "$type", "LineString"],
[ ">", "speed",90 ]
]
Is there property in OSRM tiles that indicates whether a street is one way or two way? Or is there some documentation I can read up on? I'd like to sort & change colors based on one way/two way streets.
@soupman99 in theory it should be possible. Here's the code for the Tile endpoint: https://github.com/Project-OSRM/osrm-backend/blob/master/src/engine/plugins/tile.cpp
and here's where we create the Protobuf Tile response object: https://github.com/Project-OSRM/osrm-backend/blob/d1f1358e481698a8b2401333e14d27b15582a47f/src/engine/plugins/tile.cpp#L663-L665
I think it should be possible to add forward / backward properties in the Tile endpoint's response. Looping @danpat in here who wrote the style / tile plugin.
We would need to change the way we encode the geometry if you want to highlight one-way streets. What the code does right now is encode everything as one-way geometry, and for a two-way street you get overlapping geometries with reversed coordinate order.
It's not very efficient, we could probably encode geometries once and have forward and backward properties and save quite a bit of space in the encoded tiles. Having forward & backward properties would enable you to highlight one-way roads.
This would be a breaking change to how the tiles are encoded, so it'd need to wait for OSRM 6.x.
I think we should do it, the debug tiles are unnecessarily large.
Trying to get tile service to return the vector tiles with all of the meta data but can't seem to figure it out. I keep getting
Can someone help me with setting up my style correctly to display the data?