GeoTIFF / georaster-layer-for-leaflet

Display GeoTIFFs and soon other types of raster on your Leaflet Map
https://geotiff.github.io/georaster-layer-for-leaflet-example/
Apache License 2.0
306 stars 58 forks source link

Add resolution based on zoom levels #130

Closed Falke-Design closed 1 year ago

Falke-Design commented 1 year ago

This feature makes it possible that the GeoTIFF is rendered differently based on the zoom level. This has the benefit, that we have a much better performance while moving the map and still having a high resolution on a high zoom level.

Example: Resolution from zoom level 0 and higher is 32, if zoom is 10 or higher the resolution is 100 and from 18 and higher it is 200.

var layer = new GeoRasterLayer({
    georaster: georaster,
    resolution: {
        0: 32,
        10: 100,
        18: 200
    }
});
DanielJDufour commented 1 year ago

Awesome! I think it would be nice to have a test added to this folder: https://github.com/GeoTIFF/georaster-layer-for-leaflet/tree/master/tests

Would you be interested in writing one? If not, I'd be happy to write one. I'm really appreciative of all the work you've put in and don't mean to add boring work.

DanielJDufour commented 1 year ago

In either case, we can take that up in a subsequent PR :-)

Falke-Design commented 1 year ago

Would you be interested in writing one? If not, I'd be happy to write one. I'm really appreciative of all the work you've put in and don't mean to add boring work.

I will create one 👍