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

L.Layer and L.Evented docs #3097

Closed
wants to merge 7 commits into from

Conversation

patrickarlt
Copy link
Member

Document the new L.Layer and L.Evented classes for 1.0. This documents some of major changes for in https://github.com/Leaflet/Leaflet/blob/master/CHANGELOG.md#layers-refactoring.

I wasn't quite sure where to put the docs for L.Layer, I've added them here under "Utility" but They might be better documented under "ILayer" but I'll leave it split up for now and we can discuss.

Can @mourner and/or @danzel review?

@mourner
Copy link
Member

mourner commented Dec 22, 2014

Awesome, will look this through!

They might be better documented under "ILayer"

Conceptually, the Layer class is now in place of ILayer. Earlier you needed to conform to an interface for custom layers, now you're required to inherit from Layer.

@patrickarlt
Copy link
Member Author

Technically aren't both true? You now require to inherit from L.Layer AND implement onAdd and onRemove?

What about splitting up "Utilities" and "Interfaces" into "Utilities" and "Base Classes"? Since for every interface you are now required to extend from a base class and implement specific methods, onAdd, onRemove, addHooks, removeHooks, ect...

Utilities
  • Browser
  • Util
  • Transformation
  • LineUtil
  • PolyUtil
Base Classes
  • Class
  • Evented
  • Layer (Replaces ILayer)
  • Control (Replaces IControl)
  • Handler (Replaces IHandler)
  • Projection (Replaces IProjection)
  • CRS (Replaces ICRS)

@patrickarlt patrickarlt added the docs Improvements or additions to documentation label Dec 22, 2014
@mourner
Copy link
Member

mourner commented Dec 23, 2014

Technically aren't both true? You now require to inherit from L.Layer AND implement onAdd and onRemove?

Yeah, you're right. Although this time we can get rid of the "interface" concept in docs alltogether, making things simpler to understand, because these interfaces are not sophisticated anymore — we can add a section on custom use of each class like L.Layer without calling it an interface in the table of contents.

I like the "Base Classes" suggestion.

@patrickarlt
Copy link
Member Author

I'll split this up into "Utilities" and "Base Classes" and update this PR.

@patrickarlt
Copy link
Member Author

  • Split things up into "Utilities" and "Base Classes" as previously discussed.
  • Move all docs for Control under the new "Base Classes" Header
  • Gave Layer and Control docs some more love
  • Remove references to "interfaces"

This is now a pretty huge PR so it would be great if @mourner, @danzel or someone could look over the changes so I can continue to base future docs on this set of changes.

@mourner
Copy link
Member

mourner commented Mar 6, 2015

Rebased and merged to gh-pages-master

@mourner mourner closed this Mar 6, 2015
@mourner mourner reopened this Mar 6, 2015
@mourner mourner closed this Mar 6, 2015
@mourner mourner deleted the class-layer-evented-docs branch March 6, 2015 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants