Rendering Polygons and Markers "on demand"

Skip to first unread message

Luca Bertoncello

Apr 6, 2022, 1:35:03 PMApr 6
Hi again!

So, I got to display a map with all airspaces and airports and it looks
quite like the ICAO maps.

The problem is, that there are _many_ elements. Really many elements...
And this means that displaying the maps and later exporting it as PNG is
very very slow.

My idea: just display the airspaces and airports that should be displayed.
It should be a big difference to render 20 elements or to render 2000

Well, now I don't know how to do that...
I add all airspaces with:

airspacesG = L.geoJSON(airspaces, {
style: function(feature) {

Maybe there is a better way to do that?
Second problem: to delete airspaces that should not be displayed and
display the new ones as soon as the map will be moved.

Can someone give me a suggestion how to solve my problem?
As I sayd, I'm not really an expert in Javascript... :/

Thanks a lot
Reply all
Reply to author
0 new messages