chellymehdi / vopenlayers

Automatically exported from code.google.com/p/vopenlayers
0 stars 0 forks source link

Added support for WMS styles #110

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hi,

I couldn't find a mechanism to submit a patch, so hopefully posting it here 
will suffice.

The attached (very small) changes allow a style to be specified for a WMS layer.

Cheers,
Brad

Original issue reported on code.google.com by bradch...@gmail.com on 20 Nov 2012 at 4:37

Attachments:

GoogleCodeExporter commented 8 years ago
Hi Brad,
can you provide your changes with a svn diff?

cd vopenlayers-read-only
svn update
svn diff > my_patch.diff

If you upload the patch file I will try to commit it.

Kind regards,
Eiko

Original comment by eiko.tho...@gmail.com on 21 Nov 2012 at 7:48

GoogleCodeExporter commented 8 years ago
Sorry it took me so long. Patch attached.

Original comment by bradch...@gmail.com on 28 Nov 2012 at 1:37

Attachments:

GoogleCodeExporter commented 8 years ago
Hi, I inspected the patch it seem to be okay. But currently don't understand 
for what it is good for ... in other words I want a example :-D

Can you take a look at the demo code in file 
org.vaadin.vol.demo.StyledWmsWithOpacityAndPointInfo. There is at line 71 
'wms.setSld(sld);' Do you need your code for something similiar? Sorry maybe a 
stupid question but until today I don't work with styled wms layers.

Kind regards,
Eiko

Original comment by eiko.tho...@gmail.com on 28 Nov 2012 at 10:54

GoogleCodeExporter commented 8 years ago
Hi,

An online example can be seen by looking at the response from:
http://wms.jpl.nasa.gov/wms.cgi?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilitie
s

Most of the layers contain a list of styles you can request the map in. For 
example:
 <Style> <Name>pseudo</Name> <Title>(default) Pseudo-color image, pan sharpened (Uses IR and Visual bands, 542 mapping), gamma 1.5</Title> </Style>
      <Style> <Name>pseudo_low</Name> <Title>Pseudo-color image, pan sharpened (Uses IR and Visual bands, 542 mapping)</Title> </Style>
      <Style> <Name>pseudo_bright</Name> <Title>Pseudo-color image (Uses IR and Visual bands, 542 mapping), gamma 1.5</Title> </Style>
      <Style> <Name>visual</Name> <Title>Real-color image, pan sharpened (Uses the visual bands, 321 mapping), gamma 1.5</Title> </Style>

While this is somewhat related to the client specifying the SLD, in the case 
the server has a list of pre-defined styles it supports, which can be requested 
by the client.

As a side note, I could not get the suggested 'setSld' method to work, but I 
didnt look into it in any great detail.

Cheers,
Brad

Original comment by bradch...@gmail.com on 3 Dec 2012 at 7:00

GoogleCodeExporter commented 8 years ago
Hi Brad, I don't forget your patch. Currently I have not so much time for 
vopenlayers but next days I will commit it.

Kind regards,
Eiko

Original comment by eiko.tho...@gmail.com on 11 Dec 2012 at 10:15

GoogleCodeExporter commented 8 years ago
Eiko, do you have a change to handle this soonish? I'm planning to slice a new 
version on friday.

Original comment by ma...@vaadin.com on 16 Apr 2013 at 3:39

GoogleCodeExporter commented 8 years ago
Hello Brad, I commit the patch right now. Thank you for your support and sorry 
for the late response.
Kind regards,
Eiko

@Matti: the patch brings no own test case or demo. I check only the function of 
some old demos that use the patched files. 

Original comment by eiko.tho...@gmail.com on 16 Apr 2013 at 7:26