Skip to content
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

Improve Collection docs #2367

Merged
merged 1 commit into from Jul 14, 2014
Merged

Improve Collection docs #2367

merged 1 commit into from Jul 14, 2014

Conversation

probins
Copy link
Contributor

@probins probins commented Jul 14, 2014

I've noticed a couple of people on the list confusing collection events with events on the objects in a collection, so thought this should be clarified.

@ahocevar
Copy link
Member

Thanks, good improvement

ahocevar added a commit that referenced this pull request Jul 14, 2014
@ahocevar ahocevar merged commit 9131512 into openlayers:master Jul 14, 2014
@probins probins deleted the collection branch July 14, 2014 12:56
*
* Because a Collection is itself an {@link ol.Object}, it can be bound to any
* other Object or Collection such that a change in one will automatically be
* reflected in the other.
Copy link
Member

Choose a reason for hiding this comment

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

ol.Collection has one property only: length. And that's a property you do not want to write. So instead of such a general sentence I'd provide an example showing how to bind an object property to the length of a collection. What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that comment is an adaptation of what is currently in ol.Object. I'm not sure that having examples at this level is a good idea. I don't find the current bindTo example very helpful, for example in http://ol3js.org/en/master/apidoc/ol.layer.Image.html#bindTo.
I'd agree that it would be useful to have specific examples, but I think that's better in examples or in a separate tutorial rather than at the Object/Collection docs level. The problem is when I try and think of good uses for bindTo, I can't think of very many (though that may be more a problem with my limited imagination :-) ).

Copy link
Member

Choose a reason for hiding this comment

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

Basically, I'm with you on this one.

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.

None yet

3 participants