Closed JrontEnd closed 6 years ago
When I upload a raster tile set to server, I got a wrong zoom range of the tile set.This pr is to fix this bug.
@GretaCB or @flippmoke could you give this an 👀 ? I'm not very familiar with this section of the code.
Hey @JrontEnd 👋 , thanks for the PR submission.
I took a peek at the PR locally, but I wasn't unable to replicate the zoom behaviour you described. Any chance you can provide a test raster file that replicates the behaviour you're seeing? Or better yet, add a unit test to this PR that verifies the bug/fix?
It looks odd to me that this.details.pixelSize = pixelSize
is being set at all within Raster.prototype.getZooms
since it is set when the Raster
object is created: https://github.com/mapbox/mapnik-omnivore/blob/7cfb58eb4f689e6a6330a05e01e7087f5cfb6cb9/lib/raster.js#L57. So it seems like currently if getZooms
is called it overwrites that property. I can't see why that should happen as I assume getZooms
is only returning metadata and not modifying anything. So, maybe the change should be to remove the this.details.pixelSize = pixelSize
. Agree however that ideally we'd need a testcase that this changes behavior for before proceeding.
Hi @JrontEnd any luck creating a fixture here?
Closing for now as no test case to reproduce, will revisit or open if test case is found.
Hey @JrontEnd thanks for your PR! Do you mind providing an explanation of your changes?