[Mapserver-users] SLD and mapserver...
William White
william at javamonkeys.co.uk
Fri Jul 2 11:34:28 PDT 2004
Tom - you are the man...
Thanks to your help, I am finally able to draw colours on maps! Check
it out:
http://www.globalfinancemap.com/
I'm currently using the WorldGen,WorldPolitical layers at
http://www2.dmsolutions.ca/cgi-bin/mswms_world. If anyone has any other
mapservers/layers they would suggest which might offer better images,
yet still allow me to colour different countries - please let me know.
Thanks again Tom!
Kind Regards.
William.
Kralidis,Tom [Burlington] wrote:
>
>
>>-----Original Message-----
>>From: mapserver-users-admin at lists.gis.umn.edu
>>[mailto:mapserver-users-admin at lists.gis.umn.edu] On Behalf Of
>>William White
>>Sent: Thursday, July 01, 2004 5:02 PM
>>To: mapserver-users at lists.gis.umn.edu
>>Subject: [Mapserver-users] SLD and mapserver...
>>
>>
>>Hello mapserver enthusiasts,
>>
>>I am interested in displaying a very simple world political map on my
>>global financial markets page
>>(http://www.zenfinder.com/finance/globalMarkets.php). I
>>would like to
>>fill specific countries with different colours based upon the
>>percentage
>>change of that country's major securities index.
>> From what I can gather - I should be able to do this pretty easily
>>using SLD, assuming I can find a server with a world politcal
>>map which
>>supports SLD for that particular layer.
>>
>>I found a world political map that appears to have SLD enabled:
>>
>>http://www2.dmsolutions.ca/cgi-bin/mswms_world?SERVICE=WMS&VeR
>>sIoN=1.1.1&Request=GetMap&LAYERS=WorldPolitical
>>
>>
>>but when I pass in my XML doc (see below) it doesn't appear to be
>>working. My syntax may be incorrect or potentially this
>>server does not
>>accept this type of SLD? I am assuming if I download the mapserver
>>software, I should be able to render the desired map on my
>>home computer
>>but I would much prefer to be able to leverage an existing server.
>>
>>
>
>Very good choice!
>
>
>
>>Since my requirements are quite simple (I just need to be
>>able to colour
>>a world map) - I am hoping there is an existing server which I can
>>reference and simply pass in the various style descriptors (of the
>>countries that need to be filled in) via the querystring or
>>an xml doc
>>referenced in the querystring.
>>
>>Does anyone know of a server that would allow me to do this/what I'm
>>doing wrong with this one? Any guidance or advice regarding this or
>>perhaps a simpler solution would be extremely appreciated!!!
>>
>>
>>
>
>A couple of issues:
>
>- you don't need the 'sld:' prefix in your XML elements. The default
>namespace of the SLD document should be the same as xmlns:sld
>- you don't need to put quotes around the Literal values
>
>I've attached a file which works with this WMS if you pass, along with
>your GetMap request:
>
>"SLD=<urlOfSldDocument>"
>
>
>
>
>>Thanks in advance.
>>
>>William.
>>
>>This is the xml doc I'm currently passing in as an SLD.
>><?xml version="1.0" encoding="UTF-8"?>
>><sld:StyledLayerDescriptor version="1.0.0"
>>xmlns:sld="http://www.opengis.net/sld"
>>xmlns:ogc="http://www.opengis.net/ogc"
>>xmlns:gml="http://www.opengis.net/gml"
>>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>><sld:NamedLayer>
>><sld:Name>WorldPolitical</sld:Name>
>><sld:UserStyle>
>><sld:Name>StyleName1</sld:Name>
>><sld:FeatureTypeStyle>
>><sld:Rule>
>><ogc:Filter>
>><ogc:Or>
>><ogc:PropertyIsEqualTo> <ogc:PropertyName>NAME</ogc:PropertyName>
>><ogc:Literal>'Brazil'</ogc:Literal>
>></ogc:PropertyIsEqualTo>
>><ogc:PropertyIsEqualTo> <ogc:PropertyName>NAME</ogc:PropertyName>
>><ogc:Literal>'Canada'</ogc:Literal>
>></ogc:PropertyIsEqualTo>
>></ogc:Or>
>></ogc:Filter>
>><sld:PolygonSymbolizer>
>><sld:Fill>
>><sld:CssParameter name="fill">#FF0000</sld:CssParameter>
>><sld:CssParameter name="fill-opacity">1.0</sld:CssParameter>
>></sld:Fill>
>><sld:Stroke>
>><sld:CssParameter name="stroke">#FF0000</sld:CssParameter>
>><sld:CssParameter name="stroke-opacity">1.0</sld:CssParameter>
>><sld:CssParameter name="stroke-width">1</sld:CssParameter>
>><sld:CssParameter name="stroke-linecap">butt</sld:CssParameter>
>></sld:Stroke>
>></sld:PolygonSymbolizer>
>></sld:Rule>
>></sld:FeatureTypeStyle>
>></sld:UserStyle>
>></sld:NamedLayer>
>></sld:StyledLayerDescriptor>
>>
>>
>>
>>_______________________________________________
>>Mapserver-users mailing list
>>Mapserver-users at lists.gis.umn.edu
>>http://lists.gis.umn.edu/mailman/listinfo/maps> erver-users
>>
>>
>
>
>
More information about the MapServer-users
mailing list