On Tue, Dec 13, 2011 at 10:38 AM, Mohammed Rashad <span dir="ltr"><<a href="mailto:mohammedrashadkm@gmail.com">mohammedrashadkm@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
i didnt use any strategy my code is below</blockquote><div><br></div><div>This explains why you don't get these events. What loading are you expecting to get notified of when you don't have a strategy that loads anything? </div>
<div><br></div><div>Both Strategy.Fixed and Strategy.BBOX fire loadstart and loadend events on their layer.</div><div><br></div><div>Andreas.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im HOEnZb"><br><br><br>function loadStartListener(event)<br> {<br><br> alert(0); //not reaching here<br> }<br><br></div><div class="im HOEnZb">>> >> vectors = new OpenLayers.Layer.Vector(layername_ );****<br>
map.addLayer(vectors);****<br>
vectors.events.register("loadstart", '', loadStartListener);****<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_quote">On Tue, Dec 13, 2011 at 2:47 PM, Bart van den Eijnden (OSGIS) <span dir="ltr"><<a href="mailto:bartvde@osgis.nl" target="_blank">bartvde@osgis.nl</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">And which Strategy are you using?<br>
<font color="#888888"><br>
Bart<br>
</font><div><div></div><div><br>
> openlayers trunk version<br>
><br>
> On Tue, Dec 13, 2011 at 1:43 PM, Bart van den Eijnden (OSGIS) <<br>
> <a href="mailto:bartvde@osgis.nl" target="_blank">bartvde@osgis.nl</a>> wrote:<br>
><br>
>> Since for vector layers strategies retrieve the data, the strategies<br>
>> should be responsible for firing loadstart and loadend on the layer.<br>
>><br>
>> The Fixed and the BBOX Strategy already do this.<br>
>><br>
>> What version of OpenLayers are you using?<br>
>><br>
>> Bart<br>
>><br>
>> > On Tue, Dec 13, 2011 at 1:21 PM, Dominik Mikiewicz<br>
>> > <<a href="mailto:dominikmikiewicz@o2.pl" target="_blank">dominikmikiewicz@o2.pl</a>>wrote:<br>
>> ><br>
>> >> You can easilly extend vector layer class to make it fire events as<br>
>> >> needed.<br>
>> >> ****<br>
>> >><br>
>> >> **<br>
>> >><br>
>> > how to do this?<br>
>> > extenting vector layer class to fire events<br>
>> ><br>
>> > please tell me. I dont have much knowlege in it<br>
>> ><br>
>> >> **<br>
>> >><br>
>> >> *From:* <a href="mailto:openlayers-users-bounces@lists.osgeo.org" target="_blank">openlayers-users-bounces@lists.osgeo.org</a> [mailto:<br>
>> >> <a href="mailto:openlayers-users-bounces@lists.osgeo.org" target="_blank">openlayers-users-bounces@lists.osgeo.org</a>] *On Behalf Of *Mohammed<br>
>> Rashad<br>
>> >> *Sent:* Tuesday, December 13, 2011 6:23 AM<br>
>> >> *To:* <a href="mailto:openlayers-users@lists.osgeo.org" target="_blank">openlayers-users@lists.osgeo.org</a><br>
>> >> *Subject:* [OpenLayers-Users] loadstart and loadend event not<br>
>> >> triggering**<br>
>> >> **<br>
>> >><br>
>> >> ** **<br>
>> >><br>
>> >> All,****<br>
>> >><br>
>> >> openlayers loadstart and loadend event not triggering****<br>
>> >><br>
>> >> I register the event to OpenLayers.Layer.Vector****<br>
>> >><br>
>> >> ** **<br>
>> >><br>
>> >> What I am missing??****<br>
>> >><br>
>> >> ** **<br>
>> >><br>
>> >> Here is my code****<br>
>> >><br>
>> >> function loadStartListener(event)****<br>
>> >><br>
>> >> {****<br>
>> >><br>
>> >> alert(0); //not reaching here****<br>
>> >><br>
>> >> ** **<br>
>> >><br>
>> >> }****<br>
>> >><br>
>> >> ** **<br>
>> >><br>
>> >> ** **<br>
>> >><br>
>> >> vectors = new OpenLayers.Layer.Vector(layername_ );****<br>
>> >><br>
>> >> map.addLayer(vectors);****<br>
>> >><br>
>> >> vectors.events.register("loadstart", '', loadStartListener);****<br>
>> >><br>
>> >> ** **<br>
>> >><br>
>> >> -- ****<br>
>> >><br>
>> >> Regards****<br>
>> >><br>
>> >> ** **<br>
>> >><br>
>> ><br>
>> ><br>
>> ><br>
>> > --<br>
>> > Regards,<br>
>> > _______________________________________________<br>
>> > Users mailing list<br>
>> > <a href="mailto:Users@lists.osgeo.org" target="_blank">Users@lists.osgeo.org</a><br>
>> > <a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
>> ><br>
>><br>
>><br>
>><br>
><br>
><br>
> --<br>
> Regards,<br>
><br>
<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div><font face="arial, helvetica, sans-serif">Regards,</font></div><div><font face="arial, helvetica, sans-serif"><div>
<img><br>
</div></font></div><br>
</font></span><br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Andreas Hocevar<br>OpenGeo - <a href="http://opengeo.org/">http://opengeo.org/</a><br>Expert service straight from the developers.<br><br>