[OpenLayers-Dev] Notifying user that a feature is being selected

Dominik Mikiewicz dominikmikiewicz at o2.pl
Tue Jan 25 15:48:59 EST 2011


Hi list,

 

Not sure whether I should post it to the users list or dev list so I decided
to start here.

 

In IE selecting larger features (larger = having many nodes) takes longer
than in other browsers. I understand this may be a flavor of IE but I  have
been trying to come up with a user friendly solution - a notification that
lets user know there is something happening rather than suggesting a browser
froze.

 

So far I have come up with the following:

 

                beforefeatureselected:
function(){Ext.getDom('testDiv').style.display = 'block'; alert('test');}

                featureselected:
function(){Ext.getDom('testDiv').style.display = 'none';}

 

I hook up both function to the layer that allows editing (I tried tying them
up with a control but the outcome was the same I think). My test div is just
a box so I can display it and hide (an indicator). When I leave the alert
uncommented all works as expected - a div shows up (and then the message
appears) to be hidden after the feature in question gets selected. Although
when I comment the alert part I don't get the desired effect - it looks like
there is something rather heavy happening and the execution of my js is on
hold until the feature actually gets highlighted.

 

Any ideas on how to let user know there is something happening (preferably
by showing a progress animation or ExtJs load mask) appreciated. An
information that this is the way it works in IE also would be valuable so I
don't spend more time on trying to figure out how to do it.

 

Thanks in advance

Dominik

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20110125/b18dee97/attachment.html


More information about the Dev mailing list