socib / Leaflet.TimeDimension

Add time dimension capabilities on a Leaflet map.
MIT License
435 stars 139 forks source link

Reduce calls to WMS GetCapabilities when not necessary #159

Open fox91 opened 6 years ago

fox91 commented 6 years ago

I have a single map in which I include a few dozen WMS layers from the same server, it only changes the layer and eventually the style. I would expect to see only one call to the GetCapabilities method instead I see dozens (one for each layer added to the map).

In my opinion it would be useful:

  1. identify layers from the same source and make a single call to GetCapabilities.
  2. Give the ability to invoke GetCapabilities only when the layer is activated for viewing and not when it is added to the map. Now, if I add a hundred layers from different sources, the browser makes one hundred calls to the various GetCapabilities as soon as the levels are defined without being displayed. It may be useful to have the possibility (optional, not by default) to be able to call the GetCapabilities only when the layer is added to the map by the user.