mapsense / mapsense.js

Mapsense.js
Other
88 stars 22 forks source link

layer is loading? #24

Open sttawm opened 9 years ago

sttawm commented 9 years ago

layer.isLoading()

Whether or not the layer is still waiting for visible tiles to be loaded and rendered.

layer.on("loading")

Listen for changes in the loading state. When layer.isLoading() switches from true to false, or vice versa, this event will be triggered.

Tested

With layer.on("loading", function(e) { console.log(e); }), concurrent with panning & zooming, layer.zoom, and window resizing.

Not sure if this is the exact implementation, or in the style, that we want, but it seems to work.