Skip to content

Use string values for ol.source.State enum #2247

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 26, 2014

Conversation

pagameba
Copy link
Member

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.

@fredj
Copy link
Member

fredj commented Jun 26, 2014

+1

@elemoine
Copy link
Member

Looks good to me.

* State of the source. `0` means 'loading', `1` means 'ready', and `2` means
* 'error'.
* @enum {number}
* State of the source.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the API docs to list the states, you need to mention them in prose. Something like "State of the source. Can be loading, ready or error.".

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.
@pagameba
Copy link
Member Author

Thanks for the comments, documentation updated.

pagameba added a commit that referenced this pull request Jun 26, 2014
Use string values for ol.source.State enum
@pagameba pagameba merged commit 33948a7 into openlayers:master Jun 26, 2014
@pagameba pagameba deleted the source-state branch June 26, 2014 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants