te::map::MapDisplay Class Referenceabstract

This class controls how a set of layers are displayed. More...

#include <MapDisplay.h>

Inheritance diagram for te::map::MapDisplay:
te::map::AbstractMapDisplay te::qt::widgets::MapDisplay te::qt::widgets::MultiThreadMapDisplay

Public Member Functions

virtual const te::gm::EnvelopegetExtent () const
 It returns the world extent showned by the MapDisplay. More...
 
virtual te::map::AlignType getHAlign () const
 It returns the MapDisplay current horizontal align. More...
 
virtual int getSRID () const
 It return the Spatial Reference System used by the Map Display. More...
 
virtual te::map::AlignType getVAlign () const
 It returns the MapDisplay current vertical align. More...
 
 MapDisplay ()
 It initializes a new MapDisplay. More...
 
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 affected by this modification. More...
 
virtual void setExtent (te::gm::Envelope &e, bool doRefresh=true)
 It sets the world visible area and refreshes the contents in the map display. More...
 
virtual void setLayerList (const std::list< te::map::AbstractLayerPtr > &layers)
 It sets the layer list to be showed in the Map Display. More...
 
virtual void setSRID (const int &srid, bool doRefresh=true)
 It sets a new Spatial Reference System to be used by the Map Display. More...
 
virtual ~MapDisplay ()
 Virtual destructor. More...
 
Map Display Virtual Methods

Methods to configure the MapDisplay.

virtual void refresh ()=0
 It updates the contents in the map display. More...
 
virtual unsigned int getWidth () const =0
 It returns the MapDisplay current width in pixels. More...
 
virtual unsigned int getHeight () const =0
 It returns the MapDisplay current height in pixels. More...
 
virtual double getWidthMM () const =0
 It returns the MapDisplay current width in millimeters. More...
 
virtual double getHeightMM () const =0
 It returns the MapDisplay current height in millimeters. More...
 

Protected Attributes

te::gm::Envelope m_extent
 The display extent. More...
 
te::map::AlignType m_hAlign
 The display horizontal align. More...
 
std::list< te::map::AbstractLayerPtrm_layerList
 The layer list to be displayed. More...
 
int m_srid
 The display SRS. More...
 
te::map::AlignType m_vAlign
 The display vertical align. More...
 

Detailed Description

This class controls how a set of layers are displayed.

See also
AbstractMapDisplay, AbstractLayer

Definition at line 45 of file MapDisplay.h.

Constructor & Destructor Documentation

te::map::MapDisplay::MapDisplay ( )

It initializes a new MapDisplay.

Definition at line 30 of file MapDisplay.cpp.

te::map::MapDisplay::~MapDisplay ( )
virtual

Virtual destructor.

Reimplemented in te::qt::widgets::MapDisplay.

Definition at line 38 of file MapDisplay.cpp.

Member Function Documentation

te::map::AlignType te::map::MapDisplay::getHAlign ( ) const
virtual

It returns the MapDisplay current horizontal align.

Returns
The MapDisplay current horizontal align.

Implements te::map::AbstractMapDisplay.

Definition at line 47 of file MapDisplay.cpp.

virtual unsigned int te::map::AbstractMapDisplay::getHeight ( ) const
pure virtualinherited

It returns the MapDisplay current height in pixels.

Returns
The MapDisplay current height in pixels.

Implemented in te::qt::widgets::MapDisplay.

virtual double te::map::AbstractMapDisplay::getHeightMM ( ) const
pure virtualinherited

It returns the MapDisplay current height in millimeters.

Returns
The MapDisplay current height in millimeters.

Implemented in te::qt::widgets::MapDisplay.

te::map::AlignType te::map::MapDisplay::getVAlign ( ) const
virtual

It returns the MapDisplay current vertical align.

Returns
The MapDisplay current vertical align.

Implements te::map::AbstractMapDisplay.

Definition at line 52 of file MapDisplay.cpp.

virtual unsigned int te::map::AbstractMapDisplay::getWidth ( ) const
pure virtualinherited

It returns the MapDisplay current width in pixels.

Returns
The MapDisplay current width in pixels.

Implemented in te::qt::widgets::MapDisplay.

virtual double te::map::AbstractMapDisplay::getWidthMM ( ) const
pure virtualinherited

It returns the MapDisplay current width in millimeters.

Returns
The MapDisplay current width in millimeters.

Implemented in te::qt::widgets::MapDisplay.

virtual void te::map::AbstractMapDisplay::refresh ( )
pure virtualinherited

It updates the contents in the map display.

Implemented in te::qt::widgets::MapDisplay, and te::qt::widgets::MultiThreadMapDisplay.

void te::map::MapDisplay::setAlign ( te::map::AlignType  h,
te::map::AlignType  v 
)
virtual

It will set the align rendering of objects into the map display. Just successive drawings will be affected by this modification.

Parameters
hThe new horizontal align.
vThe new vertical align.
Note
It will not automatically redraw the objects, you must explicit call the setExtent method.

Implements te::map::AbstractMapDisplay.

Definition at line 57 of file MapDisplay.cpp.

void te::map::MapDisplay::setExtent ( te::gm::Envelope e,
bool  doRefresh = true 
)
virtual

It sets the world visible area and refreshes the contents in the map display.

If the given area is not proportional to the device width and height, the MapDisplay will change it in order to preserve the aspect ratio.

Parameters
eThe world visible area.
doRefreshIf true the display will refresh its contents.
Precondition
The world coordinates must be in the map display SRS.

Implements te::map::AbstractMapDisplay.

Reimplemented in te::qt::widgets::MapDisplay, and te::qt::widgets::MultiThreadMapDisplay.

Definition at line 68 of file MapDisplay.cpp.

Referenced by te::qt::af::BaseApplication::onLayerPanToSelectedOnMapDisplayTriggered(), te::qt::widgets::MultiThreadMapDisplay::setExtent(), and te::qt::widgets::MapDisplay::setExtent().

void te::map::MapDisplay::setLayerList ( const std::list< te::map::AbstractLayerPtr > &  layers)
virtual

It sets the layer list to be showed in the Map Display.

Parameters
layersThe layer list.

Implements te::map::AbstractMapDisplay.

Definition at line 42 of file MapDisplay.cpp.

Referenced by te::qt::widgets::MixtureModelDialog::MixtureModelDialog(), and te::qt::widgets::TiePointsLocatorDialog::TiePointsLocatorDialog().

void te::map::MapDisplay::setSRID ( const int &  srid,
bool  doRefresh = true 
)
virtual

It sets a new Spatial Reference System to be used by the Map Display.

It will also convert the current envelope coordinates to the new SRS. This may cause changes to the world visible area. In this case, the extent will be updated and new internal transformation function will be calculated.

Parameters
sridThe new Spatial Reference System to be used by the Map Display.
doRefreshIf true the display will refresh its contents.

Implements te::map::AbstractMapDisplay.

Reimplemented in te::qt::widgets::MapDisplay.

Definition at line 78 of file MapDisplay.cpp.

References TE_UNKNOWN_SRS.

Referenced by te::qt::widgets::MapDisplay::setSRID().

Member Data Documentation

te::gm::Envelope te::map::MapDisplay::m_extent
protected

The display extent.

Definition at line 73 of file MapDisplay.h.

te::map::AlignType te::map::MapDisplay::m_hAlign
protected

The display horizontal align.

Definition at line 76 of file MapDisplay.h.

std::list<te::map::AbstractLayerPtr> te::map::MapDisplay::m_layerList
protected

The layer list to be displayed.

Definition at line 74 of file MapDisplay.h.

int te::map::MapDisplay::m_srid
protected

The display SRS.

Definition at line 75 of file MapDisplay.h.

te::map::AlignType te::map::MapDisplay::m_vAlign
protected

The display vertical align.

Definition at line 77 of file MapDisplay.h.


The documentation for this class was generated from the following files: