Use string values for ol.source.State enum
Many user-facing enums are string values and we document use of the string values rather than more confusing enum reference or the numeric values.
This commit is contained in:
@@ -9,15 +9,14 @@ goog.require('ol.proj');
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* State of the source. `0` means 'loading', `1` means 'ready', and `2` means
|
* State of the source, one of 'loading', 'ready' or 'error'.
|
||||||
* 'error'.
|
* @enum {string}
|
||||||
* @enum {number}
|
|
||||||
* @todo api
|
* @todo api
|
||||||
*/
|
*/
|
||||||
ol.source.State = {
|
ol.source.State = {
|
||||||
LOADING: 0,
|
LOADING: 'loading',
|
||||||
READY: 1,
|
READY: 'ready',
|
||||||
ERROR: 2
|
ERROR: 'error'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user