georaster-layer-for-leaflet
georaster-layer-for-leaflet copied to clipboard
disable animation
Hi !
i need to load multiple file tiff (24 file) then i play it (with interval 2s then next to next tiff ) my approach is:
- try pre-loading 24 tiff file to GeoRasterLayer
- then add/remove layers to the map when event interval
it's work so good but there is some animation when add new layer, how can stop it,
///add to georasterlayer
var layer = new GeoRasterLayer({
pane: isRadar ? "pane460" : "pane450",
georaster: georaster,
opacity: 1,
pixelValuesToColorFn: function (pixelValues) {
var pixelValue = pixelValues[0]; // there's just one band in this raster
if (pixelValue === 0 || pixelValue === -999.0) return null;
var color = isRadar
? radar(pixelValue).hex()
: satellite(pixelValue).hex();
return color;
},
resolution: 256,
});
return { filename: filename, layer: layer };
}
////add to layer group
this.sateLayer.clearLayers();
this.radarLayerGroup.clearLayers();
if (satelliteLayer.layer) {
satelliteLayer.layer.addTo(this.sateLayer);
satelliteLayer.layer.setZIndex(1);
}