dimfeld / svelte-maplibre

Svelte bindings for the MapLibre mapping library
https://svelte-maplibre.vercel.app
MIT License
284 stars 34 forks source link

Add a RasterLayer component #33

Closed gtnbssn closed 1 month ago

gtnbssn commented 1 year ago

For our project we will need several layers of raster data. The most appropriate component for this seems to be Layer but its documentation states This is intended for use by other type-specific layer components, such as FillLayer, and usually you will want to use one of those in your code instead of directly using this component.

Are there plans to make a RasterLayer compoment?

dimfeld commented 1 year ago

Feel free to use the Layer component directly. The comment in there was more to direct new library users to one of the other preconfigured Layer components, but I don't foresee any issues with using Layer yourself.

I didn't have any immediate plans for a RasterLayer component, but that was more a matter of personal priorities than anything else. If you do end up implementing one before I get around to it I'm happy to take a PR.

I'll rename this issue to "Add a RasterLayer component" as a reminder to myself too :)

gtnbssn commented 1 year ago

Thanks! We will use the Layer component directly for now, and if the need for a dedicated RasterLayer component appears, we'll try to make one.

gtnbssn commented 1 year ago

The way I have addressed this for now is with a custom RasterSource component that I place around the Layer.

dimfeld commented 1 month ago

We now have RasterTileSource, RasterDRMTileSource, and RasterLayer, so I think this is done.