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 std::list< AbstractLayerPtrgetLayerList () const
 
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...
 

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...
 

Map Display Virtual Methods

Methods to configure the MapDisplay.

bool m_cancel
 
virtual void refresh (bool redraw=false)=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...
 

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

◆ MapDisplay()

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

It initializes a new MapDisplay.

◆ ~MapDisplay()

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

Virtual destructor.

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

Member Function Documentation

◆ getExtent()

virtual const te::gm::Envelope& te::map::MapDisplay::getExtent ( ) const
virtual

It returns the world extent showned by the MapDisplay.

Returns
The world extent showned by the MapDisplay or NULL if none is set.
Note
The extent coordinates are in the Map Display SRS.

Implements te::map::AbstractMapDisplay.

◆ getHAlign()

virtual 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.

◆ getHeight()

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.

◆ getHeightMM()

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.

◆ getLayerList()

virtual std::list<AbstractLayerPtr> te::map::MapDisplay::getLayerList ( ) const
virtual

◆ getSRID()

virtual int te::map::MapDisplay::getSRID ( ) const
virtual

It return the Spatial Reference System used by the Map Display.

Returns
The Spatial Reference System used by the Map Display.

Implements te::map::AbstractMapDisplay.

◆ getVAlign()

virtual 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.

◆ getWidth()

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.

◆ getWidthMM()

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.

◆ refresh()

virtual void te::map::AbstractMapDisplay::refresh ( bool  redraw = false)
pure virtualinherited

It updates the contents in the map display.

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

◆ setAlign()

virtual 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.

◆ setExtent()

virtual 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.

◆ setLayerList()

virtual 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.

◆ setSRID()

virtual 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.

Member Data Documentation

◆ m_cancel

bool te::map::AbstractMapDisplay::m_cancel
protectedinherited

Definition at line 172 of file AbstractMapDisplay.h.

◆ m_extent

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

The display extent.

Definition at line 75 of file MapDisplay.h.

◆ m_hAlign

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

The display horizontal align.

Definition at line 78 of file MapDisplay.h.

◆ m_layerList

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

The layer list to be displayed.

Definition at line 76 of file MapDisplay.h.

◆ m_srid

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

The display SRS.

Definition at line 77 of file MapDisplay.h.

◆ m_vAlign

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

The display vertical align.

Definition at line 79 of file MapDisplay.h.


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