If you were to build a real world application with the above though, you would need a separate image source & raster layer for every single image, which quickly becomes unmanageable (and presumably, bad for performance).
Some use cases:
Adding building interior raster images
Adding weather pattern overlays
Adding custom captured drone satellite imagery
Often it isn't possible or performant to create a full tile raster layer for the above use cases, and there would be many "holes" in the map (e.g. for building interiors)
Design Alternatives
Adding an image source + raster layer for every single image (messy + likely impacts performance)
Building a complete raster tile layer by combining all images into one (non-performant in case layer has many holes/gaps + requires overhead to regenerate all tiles every time a new image is added)
Design
Not knowing anything about Mapbox internals, I can't really suggest an implementation, but from an API consumer perspective, something like the below would be ideal:
Motivation
Mapbox currently supports an
image
source +raster
layer, which can display a single image over a map. For example: https://docs.mapbox.com/mapbox-gl-js/example/image-on-a-map/If you were to build a real world application with the above though, you would need a separate
image
source &raster
layer for every single image, which quickly becomes unmanageable (and presumably, bad for performance).Some use cases:
Often it isn't possible or performant to create a full tile raster layer for the above use cases, and there would be many "holes" in the map (e.g. for building interiors)
Design Alternatives
Design
Not knowing anything about Mapbox internals, I can't really suggest an implementation, but from an API consumer perspective, something like the below would be ideal:
And being able to display the
radar
source in a single raster layer like below: