OpenSeaMap / vectortiles-generator

Infrastructure to generate vector tiles for OpenSeaMap
17 stars 1 forks source link

Add a style to display seamarks #3

Open aAXEe opened 8 years ago

aAXEe commented 8 years ago

Seamarks should be rendered: https://www.mapbox.com/mapbox-gl-style-spec/

indus commented 8 years ago

This seems blocked by #1. At least the attribute "category" would be needed to get a reasonable starting point.

aAXEe commented 8 years ago

This seems blocked by #1.

True. Currently you have only seamark:type as type tag in the vectortiles.

indus commented 8 years ago

Yes , I´ve seen that (and I´m amazed how fast you came up with that ;-). I already fiddled arround with it a bit. What made me wonder is the offset some points show to their rendered counterparts.

As said I wanted to have a look at the POI features first; especially the challenging system of beacon, buoy, daymark and light. All other POIs look pretty straight forward. (Demo: https://indus.github.io/OSeaM)

aAXEe commented 8 years ago

I added a export to geojson script: https://github.com/OpenSeaMap/vectortiles-generator#export-the-data-as-geojson

The (current) exported data is documented at the wiki. You can download the geojson file there.

You can upload the geojson file inside Mapbox Studio to develop the style with their interactive tools. I hope this helps developing the style.

I will add some detailed buoys into the vector tiles soon.

indus commented 8 years ago

I realized that https://www.mapbox.com/mapbox-gl-style-spec/#layout-symbol-icon-offset needs to get support for "Data-driven styling" before we will get a pleasing result. As shown in https://indus.github.io/OSeaM/oseam/ the z-layering is based on the layer-order as long as symbols come form multiple layers. Only when they come from a single layer (should be possible with data-driven icon-offset) the z-order is based on the Y coordinate of the viewport (closer to the bottom edge of the monitor gets rendered on top).

It is in the works: https://github.com/mapbox/mapbox-gl-js/issues/2431 But @lucaswoj is implemnting them one after the other or in cohesive bundles. I can´t find an issue for for "symbol layout" options right now: https://github.com/mapbox/mapbox-gl-js/search?utf8=%E2%9C%93&q=property+function&type=Issues