Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RasterLayer fails without URL #80

Closed
duebbert opened this issue Jan 30, 2019 · 1 comment
Closed

RasterLayer fails without URL #80

duebbert opened this issue Jan 30, 2019 · 1 comment
Labels

Comments

@duebbert
Copy link

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.

@soal soal added the bug label Feb 16, 2019
@soal
Copy link
Owner

soal commented Feb 16, 2019

Must be fixed in 0.2. Feel free to reopen this issue if you still have this problem.

@soal soal closed this as completed Feb 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants