geostyler / geostyler-mapbox-parser

GeoStyler-Style-Parser implementation for Mapbox
BSD 2-Clause "Simplified" License
13 stars 9 forks source link

GeoStyler should support spritesheets #290

Closed simonseyock closed 7 months ago

simonseyock commented 8 months ago

Feature Request

mapbox is based on sprite sheets. The sprite property is referreing to an url that points to a .png and .json file, by standard the mentioned mapbox sprite api is not used.

https://docs.mapbox.com/style-spec/reference/root/#sprite

Either mapbox parser can create a base64 image or the other parsers needs to accept spritesheets and handle them.

First option: geostyler-mapbox-parser could get a feature flag if it should request and transform the spritesheets.

Second option: add sprite data information to geostyler style (spriteimage, position, size). OpenLayers supports sprites: properties offset, size in https://openlayers.org/en/latest/apidoc/module-ol_style_Icon-Icon.html

KaiVolland commented 7 months ago

Some things we need to do when realizing sprite support: