dynamic loading of JS libraries associated with Layers
|Reported by:||jrf||Owned by:|
Since several popular map libraries are non-trivial in size, it would be good to load them only when the user selects that backdrop map. Such dynamic loading is challenging, because it is difficult to know when the layer has finished loading. We tried the following:
- Putting an "onLoad" attribute in the SCRIPT element
- fails because _
- Checking for the existence of named entities that won't exist until the script loads
- this might work...
- other ideas?
Once dynamic loading is solved, the layer switcher should be extended to indicate when a library is loading: display a little spinner image next to the layer until it finishes loading.