Loading panel control for an OpenLayers map.
This module has been initially developed for the needs of the OpenFIGIS FigisMap project used as web-mapping framework in the FAO Fisheries & Aquaculture website, principally through the Fisheries Global Information System (FIGIS).
Beyond the capacity to display a simple animated GIF, the ol-loadingpanel allows to provide the actual layer loading progress, e.g. by means of a progress bar. Depending on the application needs, the plugin is customizable with loading events listeners (start, progress, end).
Initially developed for Openlayers 3, the plugin is under revision for supporting later versions of OpenLayers.
The plugin has been successfully tested and, for information, it is used in production in FIGIS and several map viewers built on the OpenFairViewer framework
For users/developers interested in contributing, contributions, bug reporting and/or fixing are more than welcome! If you have questions or suggestions, please do not hesitate to contact me
UNDER REVIEW (CURRENT UPGRADE TO OPENLAYERS 6)
UNDER REVIEW (CURRENT UPGRADE TO OPENLAYERS 6)
OpenLayers Loading Panel.
See the examples for usage.
The LoadingPanel
accepts a single opt_options
parameter (of type Object
), and accepts the following properties:
Name | Type | Description |
---|---|---|
className |
String |
control CSS class name. Default value is ol-loading-panel |
widget |
String |
widget type: animatedgif (default value) or progressbar |
progressMode |
String |
mode to use for reporting progress: tile (default) or layer |
showPanel |
Boolean |
If the loading panel has to be shown. Default value is true . Value false can be used if an external loading panel element is used, together with the ol.control.LoadingPanel events |
onstart |
Object |
a function to register on load start event , with no parameter. |
onprogress |
Object |
a function to register on load progress event defined as function(loaded, toload){...} where loaded is the number of tiles (or layers ) loaded, and toload is the total number of tiles (or layers ) to be loaded |
onend |
Object |
a function to register on load end event , with no parameter. |
ol/control/Control
Show the loading panel.
Hide the loading panel.
Returns an array of [loaded,toload] values.
Returns a number between 0 and 1.
Set the map instance the control is associated with.
Name | Type | Description |
---|---|---|
map |
ol/Map |
The map instance. |
MIT (c) 2015 Emmanuel Blondel
- FigisMap Javascript API for the Fisheries Global Information System (FIGIS)
- OpenFairViewer
- UN FAO FI Department, as part of the Fisheries Global Information System (FIGIS)