MapDisplay.h
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file terralib/maptools/MapDisplay.h
22 
23  \brief The map display controls how a set of layers are displayed.
24 */
25 
26 #ifndef __TERRALIB_MAPTOOLS_INTERNAL_MAPDISPLAY_H
27 #define __TERRALIB_MAPTOOLS_INTERNAL_MAPDISPLAY_H
28 
29 // TerraLib
30 #include "AbstractMapDisplay.h"
31 
32 namespace te
33 {
34  namespace map
35  {
36  /*!
37  \class MapDisplay
38 
39  \brief This class controls how a set of layers are displayed.
40 
41  \ingroup map
42 
43  \sa AbstractMapDisplay, AbstractLayer
44  */
46  {
47  public:
48 
49  /*! \brief It initializes a new MapDisplay. */
51 
52  /*! \brief Virtual destructor. */
53  virtual ~MapDisplay();
54 
55  virtual std::list<AbstractLayerPtr> getLayerList() const;
56 
57  virtual void setLayerList(const std::list<te::map::AbstractLayerPtr>& layers);
58 
59  virtual te::map::AlignType getHAlign() const;
60 
61  virtual te::map::AlignType getVAlign() const;
62 
64 
65  virtual const te::gm::Envelope& getExtent() const;
66 
67  virtual void setExtent(te::gm::Envelope& e, bool doRefresh = true);
68 
69  virtual int getSRID() const;
70 
71  virtual void setSRID(const int& srid, bool doRefresh = true);
72 
73  protected:
74 
75  te::gm::Envelope m_extent; //!< The display extent.
76  std::list<te::map::AbstractLayerPtr> m_layerList; //!< The layer list to be displayed.
77  int m_srid; //!< The display SRS.
78  te::map::AlignType m_hAlign; //!< The display horizontal align.
79  te::map::AlignType m_vAlign; //!< The display vertical align.
80  };
81 
82  } // end namespace map
83 } // end namespace te
84 
85 #endif // __TERRALIB_MAPTOOLS_INTERNAL_MAPDISPLAY_H
te::map::MapDisplay::getVAlign
virtual te::map::AlignType getVAlign() const
It returns the MapDisplay current vertical align.
te::gm::Envelope
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:52
te::map::MapDisplay::getExtent
virtual const te::gm::Envelope & getExtent() const
It returns the world extent showned by the MapDisplay.
te
TerraLib.
Definition: AddressGeocodingOp.h:52
te::map::AlignType
AlignType
This enum contains values to control the alignment of components (like Canvas and MapDisplay).
Definition: Enums.h:126
te::map::MapDisplay::m_hAlign
te::map::AlignType m_hAlign
The display horizontal align.
Definition: MapDisplay.h:78
te::map::MapDisplay::getSRID
virtual int getSRID() const
It return the Spatial Reference System used by the Map Display.
te::map::MapDisplay::setExtent
virtual void setExtent(te::gm::Envelope &e, bool doRefresh=true)
It sets the world visible area and refreshes the contents in the map display.
te::map::MapDisplay::m_vAlign
te::map::AlignType m_vAlign
The display vertical align.
Definition: MapDisplay.h:79
te::map::MapDisplay::getHAlign
virtual te::map::AlignType getHAlign() const
It returns the MapDisplay current horizontal align.
te::map::MapDisplay::MapDisplay
MapDisplay()
It initializes a new MapDisplay.
AbstractMapDisplay.h
It defines the concept of a map display responsible for controlling how a set of layers are displayed...
te::map::AbstractMapDisplay
It defines the concept of a map display responsible for controlling how a set of layers are displayed...
Definition: AbstractMapDisplay.h:53
te::map::MapDisplay::m_srid
int m_srid
The display SRS.
Definition: MapDisplay.h:77
te::map::MapDisplay::m_extent
te::gm::Envelope m_extent
The display extent.
Definition: MapDisplay.h:75
te::map::MapDisplay::setAlign
virtual void setAlign(te::map::AlignType h, te::map::AlignType v)
It will set the align rendering of objects into the map display. Just successive drawings will be aff...
te::map::MapDisplay
This class controls how a set of layers are displayed.
Definition: MapDisplay.h:46
te::map::MapDisplay::setLayerList
virtual void setLayerList(const std::list< te::map::AbstractLayerPtr > &layers)
It sets the layer list to be showed in the Map Display.
TEMAPEXPORT
#define TEMAPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:60
te::map::MapDisplay::getLayerList
virtual std::list< AbstractLayerPtr > getLayerList() const
te::map::MapDisplay::m_layerList
std::list< te::map::AbstractLayerPtr > m_layerList
The layer list to be displayed.
Definition: MapDisplay.h:76
te::map::MapDisplay::~MapDisplay
virtual ~MapDisplay()
Virtual destructor.
te::map::MapDisplay::setSRID
virtual void setSRID(const int &srid, bool doRefresh=true)
It sets a new Spatial Reference System to be used by the Map Display.