[OpenLayers-Users] loadstart and loadend event not triggering

Mohammed Rashad mohammedrashadkm at gmail.com
Tue Dec 13 04:55:24 EST 2011


thanks. i think i can close the discussion and get back to my work
Thanks all who helped me and OpenLayers entire community

On Tue, Dec 13, 2011 at 3:12 PM, Andreas Hocevar <ahocevar at opengeo.org>wrote:

> On Tue, Dec 13, 2011 at 10:38 AM, Mohammed Rashad <
> mohammedrashadkm at gmail.com> wrote:
>
>> i didnt use any strategy my code is below
>
>
> 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?
>
> Both Strategy.Fixed and Strategy.BBOX fire loadstart and loadend events on
> their layer.
>
> Andreas.
>
>
>>
>>
>>
>> function loadStartListener(event)
>>  {
>>
>>  alert(0); //not reaching here
>>  }
>>
>> >> >> vectors = new OpenLayers.Layer.Vector(layername_ );****
>>  map.addLayer(vectors);****
>> vectors.events.register("loadstart", '', loadStartListener);****
>> On Tue, Dec 13, 2011 at 2:47 PM, Bart van den Eijnden (OSGIS) <
>> bartvde at osgis.nl> wrote:
>>
>>> And which Strategy are you using?
>>>
>>> Bart
>>>
>>> > openlayers trunk version
>>> >
>>> > On Tue, Dec 13, 2011 at 1:43 PM, Bart van den Eijnden (OSGIS) <
>>> > bartvde at osgis.nl> wrote:
>>> >
>>> >> Since for vector layers strategies retrieve the data, the strategies
>>> >> should be responsible for firing loadstart and loadend on the layer.
>>> >>
>>> >> The Fixed and the BBOX Strategy already do this.
>>> >>
>>> >> What version of OpenLayers are you using?
>>> >>
>>> >> Bart
>>> >>
>>> >> > On Tue, Dec 13, 2011 at 1:21 PM, Dominik Mikiewicz
>>> >> > <dominikmikiewicz at o2.pl>wrote:
>>> >> >
>>> >> >> You can easilly extend vector layer class to make it fire events as
>>> >> >> needed.
>>> >> >> ****
>>> >> >>
>>> >> >> **
>>> >> >>
>>> >> > how to do this?
>>> >> > extenting vector layer class to fire events
>>> >> >
>>> >> > please tell me. I dont have much knowlege in it
>>> >> >
>>> >> >> **
>>> >> >>
>>> >> >> *From:* openlayers-users-bounces at lists.osgeo.org [mailto:
>>> >> >> openlayers-users-bounces at lists.osgeo.org] *On Behalf Of *Mohammed
>>> >> Rashad
>>> >> >> *Sent:* Tuesday, December 13, 2011 6:23 AM
>>> >> >> *To:* openlayers-users at lists.osgeo.org
>>> >> >> *Subject:* [OpenLayers-Users] loadstart and loadend event not
>>> >> >> triggering**
>>> >> >> **
>>> >> >>
>>> >> >> ** **
>>> >> >>
>>> >> >> All,****
>>> >> >>
>>> >> >> openlayers loadstart and loadend event not triggering****
>>> >> >>
>>> >> >> I register the event to OpenLayers.Layer.Vector****
>>> >> >>
>>> >> >> ** **
>>> >> >>
>>> >> >> What I am missing??****
>>> >> >>
>>> >> >> ** **
>>> >> >>
>>> >> >> Here is my code****
>>> >> >>
>>> >> >> function loadStartListener(event)****
>>> >> >>
>>> >> >> {****
>>> >> >>
>>> >> >> alert(0); //not reaching here****
>>> >> >>
>>> >> >> ** **
>>> >> >>
>>> >> >> }****
>>> >> >>
>>> >> >> ** **
>>> >> >>
>>> >> >> ** **
>>> >> >>
>>> >> >> vectors = new OpenLayers.Layer.Vector(layername_ );****
>>> >> >>
>>> >> >> map.addLayer(vectors);****
>>> >> >>
>>> >> >> vectors.events.register("loadstart", '', loadStartListener);****
>>> >> >>
>>> >> >> ** **
>>> >> >>
>>> >> >> -- ****
>>> >> >>
>>> >> >> Regards****
>>> >> >>
>>> >> >> ** **
>>> >> >>
>>> >> >
>>> >> >
>>> >> >
>>> >> > --
>>> >> > Regards,
>>> >> > _______________________________________________
>>> >> > Users mailing list
>>> >> > Users at lists.osgeo.org
>>> >> > http://lists.osgeo.org/mailman/listinfo/openlayers-users
>>> >> >
>>> >>
>>> >>
>>> >>
>>> >
>>> >
>>> > --
>>> > Regards,
>>> >
>>>
>>>
>>>
>>
>>
>> --
>> Regards,
>>
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>>
>>
>
>
> --
> Andreas Hocevar
> OpenGeo - http://opengeo.org/
> Expert service straight from the developers.
>
>


-- 
Regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20111213/6eff9228/attachment-0001.html


More information about the Users mailing list