GeoTIFF / GeoTIFF/georaster-layer-for-leaflet

disable animation

Open
#116 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
352
Forks
62
PR merge metrics
No merged PRs in 30d

Description

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:
1. try pre-loading 24 tiff file to GeoRasterLayer
2. 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);
}
```
![2022-12-26-11-28-44](https://user-images.githubusercontent.com/21121259/209500496-ee11917a-0c09-4b1b-9514-779d1a326fcf.gif)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the GeoRasterLayer creation and the add/remove calls shown in the issue, then trace how the preloaded layers are attached to the Leaflet map. Verify which behavior causes the visible transition when switching TIFF layers; done means changing layers on the interval without that animation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.