[OpenLayers-Dev] API function and event for changing WMS LAYERS param?

Eric Lemoine eric.lemoine at camptocamp.com
Tue Jul 14 16:13:49 EDT 2009


On Tuesday, July 14, 2009, Bart van den Eijnden (OSGIS)
<bartvde at osgis.nl> wrote:
> Hey Tim,
>
> agreed, final question now is at which level of the hierarchy do we
> implement this? Layer.WMS or Layer.HTTPRequest?

I'd say where mergeNewParams is, so HTTPRequest.

>
> I've opened up a ticket:
>
> http://trac.openlayers.org/ticket/2179
>
> Best regards,
> Bart
>
> Tim Schaub wrote:
>> Hey-
>>
>> Eric Lemoine wrote:
>>
>>> On Tuesday, July 14, 2009,  <bartvde at osgis.nl> wrote:
>>>
>>>> Hi list,
>>>>
>>>> this came up on the geoext list [1], and Eric and I are interested how
>>>> other OL devs feel about this.
>>>>
>>>> Currently, when the LAYERS param is changed for an OpenLayers.Layer.WMS
>>>> layer, there is no way for an external component (like the GeoExt legend
>>>> panel), te know that something has changed and that they need to update
>>>> themselves.
>>>>
>>>> So what I was proposing is an API function updateLayersParam or something
>>>> similar, which will do the updating, and trigger a changelayer event with
>>>> property e.g. layersparam.
>>>>
>>>> Thoughts/comments more than welcome, also if people see other possible
>>>> solutions. Also on the naming ofcourse.
>>>>
>>>> If there is support for this, then I'll gladly create a ticket and a patch
>>>> with tests.
>>>>
>>> Hi Bart
>>>
>>> updateLayersParam may be too specific. And actually we already have
>>> mergeNewParams for updating params so we could just make
>>> mergeNewParams trigger "changelayer" with "property" set to
>>> "mergenewparams" or something. With something like that, if one is
>>> interested in updates for the "layers" param only, one will have to
>>> manually check that the "layers" param has changed. That sounds
>>> reasonable to me.
>>>
>>>
>>
>> I agree.  No need for a new method, just notification (and I think
>> "params" makes a fine value for the "property" property of the event).
>>
>>
>> Tim
>>
>>
>>> Cheers,
>>>
>>>
>>>> Best regards.
>>>> Bart
>>>>
>>>> [1] http://www.geoext.org/pipermail/dev/2009-July/000249.html
>>>>
>>>> _______________________________________________
>>>> Dev mailing list
>>>> Dev at openlayers.org
>>>> http://openlayers.org/mailman/listinfo/dev
>>>>
>>>>
>>
>>
>>
>
>
> --
> Bart van den Eijnden
> OSGIS, Open Source GIS
> bartvde at osgis.nl
> http://www.osgis.nl
>
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
>

-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com



More information about the Dev mailing list