[OpenLayers-Users] SLD creation with Function name="Categorize"

Ruben Oliveira mail.roliveira at gmail.com
Tue Apr 1 10:07:55 PDT 2014


I'm trying to create an SLD like this:

var sldFormater = new OpenLayers.Format.SLD({
        profile: "GeoServer",
        multipleSymbolizers: false,
        namedLayersAsArray: true
    });

var xmlReader = new OpenLayers.Format.XML();
var xmlDoc = xmlReader.read(sldAsXmlString);
var sld = sldFormater.read(xmlDoc);

My problem is that sldAsXmlString has a tag like this:

<ogc:Function name="Categorize">

                     <ogc:Function name="IEEERemainder">
                       <ogc:PropertyName>AZIMUTH</ogc:PropertyName>
                        <Literal>360</Literal>
                     </ogc:Function>

                     <ogc:Literal>0</ogc:Literal>
                     <ogc:Literal>0</ogc:Literal>
                     <ogc:Literal>1</ogc:Literal>

                   </ogc:Function>

When I inspect variable sld,there is no property refering to
Function name="Categorize".

The problem is in


sldFormater.read(xmlDoc)

because xmlDoc is well formed, including the tag <ogc:Function name=
"IEEERemainder">

Is the parser ignoring this tag? If so, why?

Thanks in advance!





-- 
Melhores cumprimentos / Best regards,
* Ruben Oliveira*

www.rubenoliveira.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20140401/5902a23e/attachment-0001.html>


More information about the Users mailing list