Skip to content

Load function should be called with layer as context #130

Open
natevw opened this Issue Sep 3, 2012 · 0 comments

1 participant

@natevw
natevw commented Sep 3, 2012

It'd be cleaner to write an ad-hoc layer "subclass" without actually subclassing one if the load function were called with the layer as its this context:

map.add(po.layer(function () {
    console.log(this,arguments);
}));

Currently this logs "Window" as the first object, and the layer is not available to the function unless it is captured in the outer scope.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.