Class: ProgressBar

ol.control. ProgressBar

Add a progress bar to a map. Use the layers option listen to tileload event and show the layer loading progress.


new ProgressBar( [options])

Parameters:
Name Type Argument Description
options Object <optional>

Control options.

Properties
Name Type Argument Description
className String <optional>

class of the control

label String <optional>

waiting label

layers ol.layer.Layer | Array.<ol.layer.Layer> <optional>

tile layers with tileload events

Extends

Methods


setLabel(label)

Set waiting text

Parameters:
Name Type Description
label string

setLayers(layers)

Use a list of tile layer to shown tile load

Parameters:
Name Type Description
layers ol.layer.Layer | Array.<ol.layer.Layer>

a layer or a list of layer


setPercent( [n])

Set the control visibility

Parameters:
Name Type Argument Description
n Number <optional>

progress percentage, a number beetween 0,1, default hide progress bar