27 #include "../../../common/URL.h" 28 #include "../../../geometry/serialization/xml/Serializer.h" 29 #include "../../../maptools/serialization/xml/Utils.h" 30 #include "../../../se/serialization/xml/Style.h" 31 #include "../../../xml/AbstractWriter.h" 32 #include "../../../xml/Reader.h" 33 #include "../../WMSLayer.h" 41 std::string
id = reader.
getAttr(
"id");
54 if (!encoding.empty())
111 std::auto_ptr<te::se::Style> style;
133 layer->setSRID(srid);
134 layer->setExtent(*mbr.get());
136 layer->setDataSetName(dataset);
137 layer->setDataSourceId(datasourceId);
138 layer->setRendererType(rendererId);
140 layer->setStyle(style.release());
143 layer->setGrouping(grouping);
146 layer->setChart(chart.release());
148 return layer.release();
te::map::AbstractLayer * LayerReader(te::xml::Reader &reader)
TEMAPEXPORT std::string ReadLayerVisibility(te::xml::Reader &reader)
TEMAPEXPORT void WriteAbstractLayer(const te::map::AbstractLayer *layer, te::xml::AbstractWriter &writer)
TEMAPEXPORT std::string ReadLayerEncoding(te::xml::Reader &reader)
virtual boost::int32_t getElementValueAsInt32() const
It returns the element data value in the case of VALUE node.
This class models a XML reader object.
This is the base class for layers.
virtual const te::gm::Envelope & getExtent() const
It returns the Layer extent (or minimum bounding box).
TEMAPEXPORT std::string ReadDataSourceId(te::xml::Reader &reader)
virtual void writeStartElement(const std::string &qName)=0
TEMAPEXPORT std::string ReadLayerTitle(te::xml::Reader &reader)
virtual std::string getElementLocalName() const =0
It returns the local part of the element name in the case of an element node.
const std::string & getDataSetName() const
This class models a XML writer object.
TEMAPEXPORT std::string ReadDataSetName(te::xml::Reader &reader)
TEMAPEXPORT te::map::Grouping * ReadLayerGrouping(te::xml::Reader &reader)
te::map::CompositionMode getCompositionMode() const
It returns the composition mode.
void LayerWriter(const te::map::AbstractLayer *alayer, te::xml::AbstractWriter &writer)
CompositionMode
The composition mode used to render the canvas.
This class contains the parameters needed for grouping the values of a Property.
virtual void writeElement(const std::string &qName, const std::string &value)=0
static std::string getEncodingName(EncodingType et)
Retrive a string from a given character encoding type enum.
A layer with reference to a WMS Layer.
virtual std::string getAttr(const std::string &name) const =0
It returns the attribute value in the case of an element node with valid attributes.
const std::string & getDataSourceId() const
static Style & getInstance()
It returns a reference to the singleton instance.
TEGEOMEXPORT std::unique_ptr< te::gm::Envelope > ReadExtent(te::xml::Reader &reader)
virtual te::se::Style * getStyle() const
It returns the Style associated to the layer.
TEGEOMEXPORT void SaveExtent(const te::gm::Envelope &e, te::xml::AbstractWriter &writer)
TEMAPEXPORT te::map::Visibility GetVisibility(const std::string &visible)
TEMAPEXPORT std::unique_ptr< te::map::Chart > ReadLayerChart(te::xml::Reader &reader)
const std::string & getRendererType() const
virtual void writeEndElement(const std::string &qName)=0
virtual std::string getElementValue() const =0
It returns the element data value in the case of VALUE node.
virtual NodeType getNodeType() const =0
It return the type of node read.
virtual int getSRID() const
It returns the Spatial Reference System ID associated to the Layer.
virtual bool next()=0
It gets the next event to be read.