<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV dir=ltr align=left><SPAN class=187362920-18092009><FONT face=Arial
color=#0000ff size=2>hi salas,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=187362920-18092009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=187362920-18092009><FONT face=Arial
color=#0000ff size=2>you request the layer Cuba, but in the SLD_BODY you
describe rules for the layer topp:cuba. Change it to Cuba. And if your SLD_BODY
has escaped chars, change them too (%3D =, %23 #).</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=187362920-18092009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=187362920-18092009><FONT face=Arial
color=#0000ff size=2>you can try this</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=187362920-18092009><A
href="http://urano/cgi-bin/mapserv.exe?map=d:/ms4w/apps/OpenLayers/data/educacion.map"><FONT
face=Arial size=2><A
href="http://urano/cgi-bin/mapserv.exe?map=d:/ms4w/apps/OpenLayers/data/educacion.map&Service=WMS&Version=1.1.1&Request=GetStyles&Layers=Cuba">http://urano/cgi-bin/mapserv.exe?map=d:/ms4w/apps/OpenLayers/data/educacion.map</FONT></A><FONT
face=Arial color=#0000ff
size=2>&Service=WMS&Version=1.1.1&Request=GetStyles&Layers=Cuba</A></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=187362920-18092009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=187362920-18092009><FONT face=Arial
color=#0000ff size=2>to get a sld file for the layer defined by the mapfile
.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=187362920-18092009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=187362920-18092009><FONT face=Arial
color=#0000ff size=2>Arnd</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=de dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>Von:</B> fsalas [mailto:fsalas@geocuba.cu]
<BR><B>Gesendet:</B> Freitag, 18. September 2009 23:15<BR><B>An:</B> Arnd
Wippermann<BR><B>Cc:</B> users@openlayers.org<BR><B>Betreff:</B> Re:
[OpenLayers-Users] HELP!!! How implement Filter in WMS
Layer<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT face=Arial size=2>Arnd, </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Thanks very very much for your help, the map is
show, as you said I forgot to insert a projection block.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>My finaly objetive is obtain one maps change
the sld_body params, but its don't affect the maps.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>This is part of my code </FONT></DIV>
<DIV><FONT face=Arial size=2>***********************</FONT></DIV>
<DIV><FONT face=Arial size=2> function init(){<BR> var
options = {<BR> projection: new
OpenLayers.Projection("EPSG:4267"),<BR> displayProjection: new
OpenLayers.Projection("EPSG:4267"),<BR> units:
'degrees',<BR> maxResolution:
0.05115824837085553,<BR> maxExtent: new
OpenLayers.Bounds(-86.09240990784447,19.463031059956343,-72.99589832490545,23.634939943479928),<BR> controls
: []<BR> };</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> map = new
OpenLayers.Map('map',options); <BR>
<BR> //
setup single tiled layer<BR> <BR> layer0 =
new OpenLayers.Layer.WMS( <BR> "Cuba","<A
href="http://urano/cgi-bin/mapserv.exe?map=d:/ms4w/apps/OpenLayers/data/educacion.map">http://urano/cgi-bin/mapserv.exe?map=d:/ms4w/apps/OpenLayers/data/educacion.map</A>",<BR>
{ layers:
"Cuba",<BR>
format:
"image/png",<BR>
transparent:
'true' <BR>
});<BR> <BR>
layer0.isBaseLayer=true;<BR> <BR>
map.addLayers([layer0]);<BR>
<BR> // setup
controls and initial
zooms<BR>
map.addControl(new
OpenLayers.Control.PanZoomBar());<BR>
map.addControl(new
OpenLayers.Control.Navigation());<BR>
map.addControl(new
OpenLayers.Control.Scale($('scale')));<BR>
map.addControl(new
OpenLayers.Control.MousePosition({element:$('location')}));<BR>
map.addControl(new
OpenLayers.Control.LayerSwitcher());<BR> } <BR>
<BR>function
Mostrar()<BR>{<BR> map.layers[0].mergeNewParams({SLD_BODY:'<StyledLayerDescriptor
version%3D"1.0.0"><UserLayer><Name>topp:cuba</Name><UserStyle><Name>UserSelection</Name><FeatureTypeStyle><Rule><Filter
xmlns:gml%3D"<A
href='http://www.opengis.net/gml"><PropertyIsEqualTo><PropertyName>codprov</PropertyName><Literal>pinar</Literal></PropertyIsEqualTo></Filter><PolygonSymbolizer><Fill><CssParameter'>http://www.opengis.net/gml"><PropertyIsEqualTo><PropertyName>codprov</PropertyName><Literal>pinar</Literal></PropertyIsEqualTo></Filter><PolygonSymbolizer><Fill><CssParameter</A>
name%3D"fill">%23FF0000</CssParameter></Fill></PolygonSymbolizer></Rule><Rule><LineSymbolizer><Stroke/></LineSymbolizer></Rule></FeatureTypeStyle></UserStyle></UserLayer></StyledLayerDescriptor>'});</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Best Regards,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Salas</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>***************</FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=arnd.wippermann@web.de href="mailto:arnd.wippermann@web.de">Arnd
Wippermann</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=fsalas@geocuba.cu
href="mailto:fsalas@geocuba.cu">'fsalas'</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Friday, September 18, 2009 1:50
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> AW: [OpenLayers-Users] HELP!!!
How implement Filter in WMS Layer</DIV>
<DIV><BR></DIV>
<DIV dir=ltr align=left><SPAN class=531474618-18092009><FONT face=Arial
color=#0000ff size=2>Hi salas,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=531474618-18092009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=531474618-18092009><FONT face=Arial
color=#0000ff size=2>as the message says, you have forgotten to insert a
projection block in the mapfile on map level.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=531474618-18092009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=531474618-18092009><FONT face=Arial
color=#0000ff size=2> PROJECTION<BR>
'init=EPSG:4267'<BR> END<BR></DIV></FONT></SPAN>
<DIV dir=ltr align=left><SPAN class=531474618-18092009><FONT face=Arial
color=#0000ff size=2>Arnd</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=de dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>Von:</B> fsalas [mailto:fsalas@geocuba.cu]
<BR><B>Gesendet:</B> Freitag, 18. September 2009 19:28<BR><B>An:</B> Arnd
Wippermann<BR><B>Betreff:</B> Re: [OpenLayers-Users] HELP!!! How implement
Filter in WMS Layer<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT face=Arial size=2>Arnd, the problem persist , I atach the imagen
error and the map file and the html file.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV>
<P><FONT face=Arial size=2><FONT size=3>I don´t know how resolve this problem,
can you chek this files?</FONT></FONT></P>
<P><FONT face=Arial></FONT> </P>
<P><FONT face=Arial>Regards , salas</FONT></P>
<P><FONT face=Arial size=2>----- Original Message ----- </FONT></P></DIV>
<DIV>
<DIV><FONT face=Arial size=2>From: "Arnd Wippermann" <</FONT><A
href="mailto:arnd.wippermann@web.de"><FONT face=Arial
size=2>arnd.wippermann@web.de</FONT></A><FONT face=Arial
size=2>></FONT></DIV>
<DIV><FONT face=Arial size=2>To: "'fsalas'" <</FONT><A
href="mailto:fsalas@geocuba.cu"><FONT face=Arial
size=2>fsalas@geocuba.cu</FONT></A><FONT face=Arial size=2>></FONT></DIV>
<DIV><FONT face=Arial size=2>Sent: Friday, September 18, 2009 10:28
AM</FONT></DIV>
<DIV><FONT face=Arial size=2>Subject: AW: [OpenLayers-Users] HELP!!! How
implement Filter in WMS Layer</FONT></DIV></DIV>
<DIV><FONT face=Arial><BR><FONT size=2></FONT></FONT></DIV><FONT face=Arial
size=2>Hi salas,<BR><BR>Now have a look at your OpenLayers code. I suggest,
that you have no options<BR>set for your
map.<BR><BR>
var options =
{<BR>
projection: new
OpenLayers.Projection("EPSG:900913"),<BR>
displayProjection: new
OpenLayers.Projection("EPSG:4326"),<BR>
units:
"m",<BR>
numZoomLevels:
18,<BR>
maxResolution:
156543.0339,<BR>
maxExtent: new OpenLayers.Bounds(-20037508, -20037508,<BR>20037508,
20037508.34),<BR>
controls :
[]<BR>
};<BR><BR>
map = new OpenLayers.Map('map', options); <BR><BR>It is an example for the
google projection.<BR><BR>Arnd<BR><BR>-----Ursprüngliche
Nachricht-----<BR>Von: fsalas [mailto:fsalas@geocuba.cu] <BR>Gesendet:
Freitag, 18. September 2009 18:14<BR>An: Arnd Wippermann<BR>Cc: </FONT><A
href="mailto:users@openlayers.org"><FONT face=Arial
size=2>users@openlayers.org</FONT></A><BR><FONT face=Arial size=2>Betreff: Re:
[OpenLayers-Users] HELP!!! How implement Filter in WMS
Layer<BR><BR>Arnd,<BR><BR>I don't Know why in WMS request ,the EPSG is
different of 2085, Its<BR>EPSG:4326<BR><BR>----- Original Message
-----<BR>From: "Arnd Wippermann" <</FONT><A
href="mailto:arnd.wippermann@web.de"><FONT face=Arial
size=2>arnd.wippermann@web.de</FONT></A><FONT face=Arial size=2>><BR>To:
"'fsalas'" <</FONT><A href="mailto:fsalas@geocuba.cu"><FONT face=Arial
size=2>fsalas@geocuba.cu</FONT></A><FONT face=Arial size=2>><BR>Sent:
Friday, September 18, 2009 9:06 AM<BR>Subject: AW: [OpenLayers-Users] HELP!!!
How implement Filter in WMS Layer<BR><BR><BR>Hi,<BR><BR>You have not added the
projection block to the layer. Perhaps it is needed,<BR>i'm not sure. I
declare always a projection for the map (as default output),<BR>and for the
layers (the data have to be in a specific projection).<BR><BR>If the problem
remain, do the next:<BR><BR>The message comes, when the WMS requests for an
EPSG, that is not declared<BR>in the wms_srs tag. Have you in OpenLayers the
projection for the map set to<BR>EPSG:2085. For the layer you need not declare
the SRS, because OpenLayers<BR>add the EPSG from the map to the SRS parameter
for the WMS layer.<BR><BR>Use right click on your map to get the url for one
tile of your WMS. Paste<BR>the url into the addressbar of your browser. The
errormessage should be the<BR>same. But now you can inspect the WMS request.
Look at the SRS. Is
it<BR>&SRS=EPSG:2085?<BR><BR>Arnd<BR><BR>-----Ursprüngliche
Nachricht-----<BR>Von: fsalas [mailto:fsalas@geocuba.cu]<BR>Gesendet: Freitag,
18. September 2009 16:31<BR>An: Arnd Wippermann<BR>Betreff: Re:
[OpenLayers-Users] HELP!!! How implement Filter in WMS Layer<BR><BR>Arn , I
make your suggestion in my map file but the problem persist<BR><BR>I atach my
map file and the error image<BR><BR>regards
salas<BR><BR>___________________________________<BR>Dirección de
Comunicaciones<BR>Grupo Empresarial GEOCUBA<BR>Este mensaje esta libre de
virus.<BR>Revisado por Kaspersky
Antivirus<BR>----------------------------------------------------------------------<BR>Definition
count: 2596814<BR>Definition date: 9/18/2009<BR>SecurityPlus
version:
3.0.5<BR><BR><BR><BR><BR>___________________________________<BR>Dirección de
Comunicaciones<BR>Grupo Empresarial GEOCUBA<BR>Este mensaje esta libre de
virus. <BR>Revisado por Kaspersky
Antivirus<BR>----------------------------------------------------------------------<BR>Definition
count: 2596814<BR>Definition date: 9/18/2009<BR>SecurityPlus
version:
3.0.5<BR><BR><BR><BR></FONT><BR>___________________________________<BR>Dirección
de Comunicaciones<BR>Grupo Empresarial GEOCUBA<BR>Este mensaje esta libre de
virus. <BR>Revisado por Kaspersky
Antivirus<BR>----------------------------------------------------------------------<BR>Definition
count: 2596814 Definition date: 9/18/2009 SecurityPlus version: 3.0.5
<BR></BLOCKQUOTE><BR>___________________________________<BR>Dirección de
Comunicaciones<BR>Grupo Empresarial GEOCUBA<BR>Este mensaje esta libre de virus.
<BR>Revisado por Kaspersky
Antivirus<BR>----------------------------------------------------------------------<BR>Definition
count: 2596814 Definition date: 9/18/2009 SecurityPlus version: 3.0.5
<BR></BODY></HTML>