StyledLayerDescriptor.js
Summary
No overview generated for 'StyledLayerDescriptor.js'
mapbuilder.loadScript(baseDir+"/model/ModelBase.js");
function StyledLayerDescriptor(modelNode, parent) {
ModelBase.apply(this, new Array(modelNode, parent));
this.sld = null;
this.namespace = "xmlns:sld='http://www.opengis.net/sld' xmlns:mb='http://mapbuilder.sourceforge.net/mapbuilder' xmlns:wmc='http://www.opengis.net/context' xmlns:wms='http://www.opengis.net/wms' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:ogc='http://www.opengis.net/ogc' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns:wfs='http://www.opengis.net/wfs'";
this.sldXPath = this.getProperty("mb:sldXPath", "/sld:StyledLayerDescriptor");
this.getSldNode=function() {
return this.doc.selectSingleNode(this.sldXPath);
}
this.loadSLD = function(objRef) {
var format = new OpenLayers.Format.SLD();
var sldNode = objRef.doc.selectSingleNode(objRef.sldXPath);
objRef.sld = format.read(new XMLSerializer().serializeToString(sldNode));
}
this.addFirstListener("loadModel", this.loadSLD, this);
}
Documentation generated by
JSDoc on Sun Apr 27 20:30:54 2008