-
Notifications
You must be signed in to change notification settings - Fork 140
Closed
Labels
Description
I have a raster layer that I want to add without a TileJSON URL, so I'm loading it like this:
<MglRasterLayer
:sourceId="layer.id"
:layerId="layer.id"
:minZoom="layer.zoom_min"
:maxZoom="layer.zoom_max"
:tiles="[layer.url]"
:tileSize="256"
:attribution="layer.attribution"
/>
This fails because mapbox-gl sees a url property on the source object. It's undefined but this seems to trigger a validation error in mapbox-gl and it ignores the tiles parameter then.
I believe the problem is in src/components/layer/RasterLayer.js line 47:
let source = {
type: "raster",
url: this.url,
tileSize: this.tileSize
};
The url property should only be defined if this.url has been defined.