Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

How to check if the map tiles are loaded?

I need to know whether all map tiles are loaded on to the OpenLayers map as html contents.... Is there any method to find out or function in openlayers to find out for how much percentage the map tiles are loaded.......

share|improve this question

1 Answer 1

up vote 6 down vote accepted

see the Layer Load Monitoring sample for some ideas.

layer.events.register("loadend", layer, function() {
  this.logEvent("Load End. Grid:" + this.grid.length + "x" + this.grid[0].length);
});
share|improve this answer
    
thanks @stephen it helped me..... –  Raghu Sep 4 '12 at 14:40
1  
@Raghu glad it was useful. If a post is answered on Stack Exchange, you should use the green tick on the left-hand side of the answer to close it off. –  Stephen Lead Sep 4 '12 at 22:39
    
is there a call that would check every layer on the map rather than just one single layer? or do we basically have to monitor each one separately? –  Manuel Arredondo Dec 3 '12 at 21:15
    
@ManuelArredondo I can't see any map-level events at dev.openlayers.org/docs/files/OpenLayers/… so I believe you'll need to monitor each layer separately. –  Stephen Lead Dec 4 '12 at 0:33

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.