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

Marc Jansen jansen at terrestris.de
Tue Aug 24 08:31:54 EDT 2010


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
>    




More information about the Dev mailing list