QMapControl  0.9.7.4
Public Member Functions | List of all members
OSMMapAdapter Class Reference

MapAdapter for OpenStreetMap. More...

#include <osmmapadapter.h>

Inheritance diagram for OSMMapAdapter:
TileMapAdapter MapAdapter QObject

Public Member Functions

virtual void changeHostAddress (const QString qHost, const QString qServerPath=QString())
 change or update server host address post init More...
 
virtual QPoint coordinateToDisplay (const QPointF &) const
 translates a world coordinate to display coordinate More...
 
int currentZoom () const
 returns the current zoom More...
 
virtual QPointF displayToCoordinate (const QPoint &) const
 translates display coordinate to world coordinate More...
 
QString host () const
 returns the host of this MapAdapter More...
 
int maxZoom () const
 returns the max zoom value More...
 
int minZoom () const
 returns the min zoom value More...
 
 OSMMapAdapter ()
 constructor More...
 
virtual QString serverPath () const
 returns the server path part of this MapAdapter More...
 
int tilesize () const
 returns the size of the tiles More...
 

Detailed Description

MapAdapter for OpenStreetMap.

This is a conveniece class, which extends and configures a TileMapAdapter

Author
Kai Winter kaiwi.nosp@m.nter.nosp@m.@gmx..nosp@m.de

Constructor & Destructor Documentation

constructor

This construct a OpenStreetmap Adapter

Member Function Documentation

void changeHostAddress ( const QString  qHost,
const QString  qServerPath = QString() 
)
virtualinherited

change or update server host address post init

Parameters
hostthe host address
serverPaththe server path

Reimplemented in WMSMapAdapter.

Referenced by WMSMapAdapter::changeHostAddress().

QPoint coordinateToDisplay ( const QPointF &  coordinate) const
virtualinherited

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
coordinatethe 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
virtualinherited

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
pointthe 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
QString serverPath ( ) const
virtualinherited

returns the server path part of this MapAdapter

Returns
the serverpath of this MapAdapter

Reimplemented in WMSMapAdapter.

Referenced by WMSMapAdapter::serverPath().

int tilesize ( ) const
inherited

returns the size of the tiles

Returns
the size of the tiles

Referenced by WMSMapAdapter::changeHostAddress().


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