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.

I have vector layer with WFS protocol. and because I have a huge amount of data, there is a while before features loaded on the map.

So i need to tell user to wait a moment until they load by display a "waiting" animation.

I found this Waiting for Vector & WFS loading

and tried it with no luck so far.

here is what I did:

  • I placed the LoadingPanel.js

  • I added this stylesheet:

    <style type="text/css">
    
    .olControlLoadingPanel {
    
            background-image:url(loading.gif);
    
            position: relative;
    
            width: 195px;
    
            height: 11px;
    
            background-position:center;
    
            background-repeat:no-repeat;
    
            display: none;
    
        }
    
     </style>`
    
  • and finally added the LoadingPanel control :

    map.addControl(new OpenLayers.Control.LoadingPanel());

share|improve this question
    
Have a look at this question gis.stackexchange.com/a/31206/3895 –  unicoletti Oct 24 '12 at 6:52
add comment

1 Answer 1

up vote 2 down vote accepted

could be your z-index? This works for me here

.olControlLoadingPanel {
background-image: url(../OpenLayers/theme/default/img/load.gif);
left:45%;
top: 45%;
position: absolute;
width: 250px;
height:250px;
background-position: center;
background-repeat: no-repeat;
display: none;
z-index: 1000;

}

share|improve this answer
    
Thanks, but does that work with vactor/wfs layer? –  Shadin Nov 3 '12 at 10:05
    
I think so. I looked at LoadingPanel.js and it seems to be activated by layers, not layer type. –  geomajor56 Nov 4 '12 at 16:39
add comment

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.