-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
https://stackoverflow.com/questions/37447457/dynamically-reload-leaflet-tiles
L.TileLayer.CustomLayer = L.TileLayer.extend({
getTileUrl: (coords) => {
var test = some_function_deciding_test_based_on_tile(coords);
return `http://example.com/tile_${coords.x}_${coords.y}.png?test=${test}`;
}
});vs openlayer https://github.com/Disfactory/frontend/blob/df24ba632041d9f39bb5360a62e88c953b7ebaa9/src/lib/map.ts#L391-L397
tileLoadFunction: function (imageTile, src) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const image: HTMLImageElement = (imageTile as any).getImage()
flipArgriculturalLand(src).then(newSrc => {
image.src = newSrc
})
},