thank you very much actually it works.

2011/5/15 hassane allouch <[email protected]>

> Thank you. With this solution if i click three times the buton with
> different  paramter's value  i will have in the layer's url  three
>
>> viewparams: "province:" + idProv  or just the final one  ?
>>
>
> thank you very much.
>
> 2011/5/15 Andreas Hocevar <[email protected]>
>
>> Hi,
>>
>> instead of layer.redraw(true), try
>>
>> layer.mergeNewParams({viewparams: "province:" + idProv});
>>
>> Regards,
>> Andreas.
>>
>> On Sun, May 15, 2011 at 11:20 AM, hassane allouch
>> <[email protected]> wrote:
>> > Hello
>> >
>> > I have a mappanel (containning a wms layer with parametrized url {sql
>> View})
>> > , a textField and buton. When the user enter the value of the
>> parameter's
>> > url and click the buton, the mapPanel should reload with the new url
>> (the
>> > new value of the parameter) without reloading all the web page. I tried
>> > layer.redraw(true), it refreshs the panel but wth the same value of the
>> > parameter (so the same url).
>> >
>> >
>> > this is the code:
>> >
>> > var layerDashBoard = new OpenLayers.Layer.WMS(
>> >      "communeProv",
>> >
>> >  "
>> http://localhost:8080/geoserver/sf/wms?service=WMS&version=1.1.0&request=GetMap&layers=sf:communeProv&srs=EPSG:4326&viewparams=province
>> :"
>> > + idProv,
>> >      {layers: "sf:communeProv",
>> >      format: "image/png",
>> >      }
>> >
>> >     );
>> >
>> > thank you
>> >
>> >
>> > _______________________________________________
>> > Users mailing list
>> > [email protected]
>> > http://www.geoext.org/cgi-bin/mailman/listinfo/users
>> >
>> >
>>
>>
>>
>> --
>> Andreas Hocevar
>> OpenGeo - http://opengeo.org/
>> Expert service straight from the developers.
>>
>
>
_______________________________________________
Users mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/users

Reply via email to