Reputation: 1
what is the ol3 (openlayers) equivalent of this google.maps event : google.maps.event.addDomListener(window, 'load', initialize);
Upvotes: 0
Views: 217
Reputation: 109
Use the 'once' method of your map instance.
map.getView().once('change', fn...)
map.getView().once('change:resolution', fn...)
map.once('postrender', fn...)
More References here
Upvotes: 1
Reputation: 6051
The load
event is called when the document has finished loading? OpenLayers does not provide an event for this, but you can use jQuery's $(document).ready()
.
Upvotes: 0