From bf9dbd614a71747b1bb8441c93f2bfb8ffc05cbd Mon Sep 17 00:00:00 2001 From: Paul Spencer <paul@pagameba.com> Date: Wed, 25 Jun 2014 21:31:30 -0400 Subject: [PATCH] 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. --- src/ol/source/source.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/ol/source/source.js b/src/ol/source/source.js index e4cf3d9befc..232e0cc04ce 100644 --- a/src/ol/source/source.js +++ b/src/ol/source/source.js @@ -9,15 +9,14 @@ goog.require('ol.proj'); /** - * State of the source. `0` means 'loading', `1` means 'ready', and `2` means - * 'error'. - * @enum {number} + * State of the source, one of 'loading', 'ready' or 'error'. + * @enum {string} * @todo api */ ol.source.State = { - LOADING: 0, - READY: 1, - ERROR: 2 + LOADING: 'loading', + READY: 'ready', + ERROR: 'error' };