The source's resolution is converted to meters here:
|
var pixelSize = utils.convertToMeters(this.details.pixelSize, utils.getUnitType(this.projection)); |
But then the resolution in native units is then used to calculate the max zoom:
|
var validSpatialResolutions = utils.getValidSpatialResolutions(spatialResolutions, _this.details.pixelSize[0], thresholdWeight); |
This results in incorrect maxzoom selection for non-meter source data, as the thresholds for zoom levels are defined in mercator meters. This can be fixed by simply swapping out _this.details.pixelSize[0] for pixelSize[0] above.
cc @pratikyadav
The source's resolution is converted to
metershere:mapnik-omnivore/lib/raster.js
Line 162 in 29ead36
But then the resolution in native units is then used to calculate the max zoom:
mapnik-omnivore/lib/raster.js
Line 173 in 29ead36
This results in incorrect maxzoom selection for non-meter source data, as the thresholds for zoom levels are defined in mercator meters. This can be fixed by simply swapping out
_this.details.pixelSize[0]forpixelSize[0]above.cc @pratikyadav