You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior: I would like a map loaded or perhaps a map reloaded event that gets fired when all sources and styles changes have been resolved and rendered. The load event only gets fired when the map is first rendered, never again.
Actual behavior: Currently there is no way of being informed that a map has rendered all the changes that you make. If I run an action that toggles the visibility of 20 layers to show each of them, I'd like to know when the map is finished rendering all of them.
The use case is that I want to call featuresIn on a set of layers but cannot do so until they have been rendered. I am currently monitoring the render event that fires in js/ui/map.js and then checking map.loaded(), but I'd rather be told by a specific event.
Will look into creating a PR for this soon, posting this issue for feedback while I work on it.
The text was updated successfully, but these errors were encountered:
timjcook
changed the title
Fire an event when map.loaded() changes from false to true
Fire an event when map.loaded() changes from false to true
Feb 25, 2016
We've put some thought into this issue but haven't settled on a solution yet. We will either need a different event from load, maybe something enumerated like readystate.
Can you add your comments to the discussion on #1715?
Context
Report
Expected behavior: I would like a map
loaded
or perhaps a mapreloaded
event that gets fired when all sources and styles changes have been resolved and rendered. Theload
event only gets fired when the map is first rendered, never again.Actual behavior: Currently there is no way of being informed that a map has rendered all the changes that you make. If I run an action that toggles the visibility of 20 layers to show each of them, I'd like to know when the map is finished rendering all of them.
The use case is that I want to call
featuresIn
on a set of layers but cannot do so until they have been rendered. I am currently monitoring therender
event that fires injs/ui/map.js
and then checkingmap.loaded()
, but I'd rather be told by a specific event.Will look into creating a PR for this soon, posting this issue for feedback while I work on it.
The text was updated successfully, but these errors were encountered: