Skip to content

Conversation

tmcw
Copy link
Contributor

@tmcw tmcw commented Feb 20, 2013

If the map's center/zoom is not set, this test fails, and I'm not sure
why.


describe("accessing a tilelayer's properties", function () {
it('provides a container', function () {
map.setView([0, 0], 1);
Copy link
Member

Choose a reason for hiding this comment

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

Got some spacing issues going on here by the looks

@@ -122,6 +122,10 @@ L.TileLayer = L.Class.extend({
return this.options.attribution;
},

getContainer: function () {
return this._container;
},
Copy link
Member

Choose a reason for hiding this comment

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

whitespace

@mourner
Copy link
Member

mourner commented Feb 20, 2013

It fails otherwise because TileLayer (and all other layers) doesn't get initialized (through onAdd) until it's actually added to an initialized map. Kind of lazy initialization.

mourner added a commit that referenced this pull request Feb 20, 2013
Add a public API for getContainer for TileLayer
@mourner mourner merged commit 3063fd9 into Leaflet:master Feb 20, 2013
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.

3 participants