[OpenLayers-Dev] [OpenLayers-Users] Permalink doesn't update on addlayer/removelayer

Slawomir Messner slawomir.messner at staff.uni-marburg.de
Tue Aug 24 08:42:11 EDT 2010


  It would be also my solution for this bug, if it's one. I forgot to 
mention and maybe it was the wrong list. Maybe I should also mention 
that we're using the current svn code.
It add the listener now in our "mapcontroller" so I can easy switch to 
an official solution.
Thx for the answer,
Slawomir

Am 24.08.2010 14:31, schrieb Marc Jansen:
> Hi Slawomir,
>
> I'd consider this a bug with a (on first sight) reasonable easy fix:
>
> In the Permalinks draw-method:
>
>           this.map.events.on({
>               'moveend': this.updateLink,
>               'changelayer': this.updateLink,
>               'changebaselayer': this.updateLink,
>               'addlayer': this.updateLink,
>               'removelayer': this.updateLink,
>               scope: this
>           });
>
> Or one could think of triggering a changelayer event when a layer has
> been added/removed in Map.js.
>
> I am unsure which design is better, so I'd suggest opening up a ticket
> (I cc'ed the developer list so the core developers notice this discussion).
>
> Regards,
> Marc
>
>
>
>
> On 24.08.2010 13:53, Slawomir Messner wrote:
>>     Hello,
>> Does anyone know why Permalink doesn't listen to addlayer/removelayer?
>> Every time I add a new layer I have to change a property(i.e.
>> visibility) to refresh the link. It's a bug or a feature?
>> Regards,
>> Slawomir
>>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>


-- 
-----------------------------------------------
Slawomir Messner
Forschungszentrum "Deutscher Sprachatlas"




More information about the Dev mailing list