Closed 12rambau closed 2 years ago
Actually, that's something super useful for the end-user, so I would say that this is a good idea. Now I'm thinking on the SEPAFE app, which is adding and removing planet layers depending on the user's selections, it can add like 8 layers at the same time, so in that case, having one loading widget per image is too much... The Planet ordering module has a spinning wheel in the center of the map, what do you think about having it as native in all maps?
the spinning wheel in the center of the map is the default behaviour of leaflet layers but they overlap when there are multiple layers (I think that's why it's set to False by default) and it could be blocking the view of the user, that's what I meant with:
I've looked into the loading widgets that exists in ipyleaflet and that's not very elegant (from my perspective).
If there is an issue with the multiple layers, we could do it another way. having one statebar wheel, the user defined if it's shown in the init params. Stating:
That's a great idea!
issue
I experienced some issues with the FCDM module as the map is super slow to load (it uses a adaptative buffer, the more you zoom the slower it gets it's a nightmare). The consequence is that the user clicks frantically on the
zoom
unzoom
btn and the layer never fully loads and they eventually break the app.I've looked into the loading widgets that exists in ipyleaflet and that's not very elegant (from my perspective).
current implementation
I came up with the idea of overwriting the
add_layer
method to add aStateBar
at the top left corner for every layer and dynamically show them when the tile are reloading. overwritting theadd_layer
method is super versatile as it's the basic function called by all the others (add_ee_layer
,addLayer
,add_raster_layer
... etc).questions
demo
Here is a gif demo and the the code I used.