WMSMapAdapter Class Reference

MapAdapter for WMS servers. More...

#include <wmsmapadapter.h>

Inheritance diagram for WMSMapAdapter:

MapAdapter

List of all members.

Public Member Functions

virtual QPoint coordinateToDisplay (const QPointF &) const
 translates a world coordinate to display coordinate
int currentZoom () const
 returns the current zoom
virtual QPointF displayToCoordinate (const QPoint &) const
 translates display coordinate to world coordinate
QString host () const
 returns the host of this MapAdapter
int maxZoom () const
 returns the max zoom value
int minZoom () const
 returns the min zoom value
int tilesize () const
 returns the size of the tiles
 WMSMapAdapter (QString host, QString serverPath, int tilesize=256)
 constructor


Detailed Description

MapAdapter for WMS servers.

Use this derived MapAdapter to display maps from WMS servers

Author:
Kai Winter <kaiwinter@gmx.de>

Constructor & Destructor Documentation

WMSMapAdapter ( QString  host,
QString  serverPath,
int  tilesize = 256 
)

constructor

Sample of a correct initialization of a MapAdapter:
MapAdapter* mapadapter = new WMSMapAdapter("www2.demis.nl", "/wms/wms.asp?wms=WorldMap[...]&BBOX=%1,%2,%3,%4&WIDTH=%5&HEIGHT=%5&TRANSPARENT=TRUE", 256);
The placeholders 1, 2, 3, 4 creates the bounding box, 5 is for the tilesize The minZoom is 0 (means the whole world is visible). The maxZoom is 17 (means it is zoomed in to the max)

Parameters:
host The servers URL
serverPath The path to the tiles with placeholders
tilesize the size of the tiles


Member Function Documentation

QPoint coordinateToDisplay ( const QPointF &  coordinate  )  const [virtual]

translates a world coordinate to display coordinate

The calculations also needs the current zoom. The current zoom is managed by the MapAdapter, so this is no problem. To divide model from view the current zoom should be moved to the layers.

Parameters:
coordinate the world coordinate
Returns:
the display coordinate (in widget coordinates)

Implements MapAdapter.

int currentZoom (  )  const [inherited]

returns the current zoom

Returns:
the current zoom

QPointF displayToCoordinate ( const QPoint &  point  )  const [virtual]

translates display coordinate to world coordinate

The calculations also needs the current zoom. The current zoom is managed by the MapAdapter, so this is no problem. To divide model from view the current zoom should be moved to the layers.

Parameters:
point the display coordinate
Returns:
the world coordinate

Implements MapAdapter.

QString host (  )  const [inherited]

returns the host of this MapAdapter

Returns:
the host of this MapAdapter

int maxZoom (  )  const [inherited]

returns the max zoom value

Returns:
the max zoom value

int minZoom (  )  const [inherited]

returns the min zoom value

Returns:
the min zoom value

int tilesize (  )  const [inherited]

returns the size of the tiles

Returns:
the size of the tiles


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

Generated on Wed Jul 29 12:38:10 2009 for QMapControl by  doxygen 1.5.9