Skip to content

Instantly share code, notes, and snippets.

@mourner
Created December 12, 2012 10:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mourner/4266919 to your computer and use it in GitHub Desktop.
Save mourner/4266919 to your computer and use it in GitHub Desktop.
New in Leaflet master: AOP-style constructor hooks for all classes. Example:
L.Marker.addInitHook(function () {
// do some additional stuff in the constructor, e.g.:
this.on('click', doExcitingStuff);
// will be called for all instances of Marker
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment