32
32
class YahooTiledMapAdapter : public QObject, public IMapAdapter
35
Q_INTERFACES(IMapAdapter)
35
Q_INTERFACES(IMapAdapter)
40
* This construct a Yahoo Adapter
42
YahooTiledMapAdapter();
43
virtual ~YahooTiledMapAdapter();
46
//! returns the unique identifier (Uuid) of this MapAdapter
48
* @return the unique identifier (Uuid) of this MapAdapter
50
virtual QUuid getId () const;
52
//! returns the type of this MapAdapter
54
* @return the type of this MapAdapter
56
virtual IMapAdapter::Type getType () const;
58
//! returns the name of this MapAdapter
60
* @return the name of this MapAdapter
62
virtual QString getName () const;
64
//! returns the host of this MapAdapter
66
* @return the host of this MapAdapter
68
virtual QString getHost () const;
70
//! returns the size of the tiles
72
* @return the size of the tiles
74
virtual int getTileSize () const;
76
//! returns the min zoom value
78
* @return the min zoom value
80
virtual int getMinZoom () const;
82
//! returns the max zoom value
84
* @return the max zoom value
86
virtual int getMaxZoom () const;
88
//! returns the current zoom
90
* @return the current zoom
92
virtual int getZoom () const;
94
virtual int getAdaptedZoom() const;
95
virtual int getAdaptedMinZoom () const;
96
virtual int getAdaptedMaxZoom () const;
98
virtual void zoom_in();
99
virtual void zoom_out();
101
virtual bool isValid(int x, int y, int z) const;
102
virtual QString getQuery(int x, int y, int z) const;
103
virtual QString getQuery(const QRectF& wgs84Bbox, const QRectF& projBbox, const QRect& size) const { return ""; }
104
virtual QPixmap getPixmap(const QRectF& wgs84Bbox, const QRectF& projBbox, const QRect& size) const { return QPixmap(); };
106
//! translates a world coordinate to display coordinate
108
* The calculations also needs the current zoom. The current zoom is managed by the MapAdapter, so this is no problem.
109
* To divide model from view the current zoom should be moved to the layers.
110
* @param coordinate the world coordinate
111
* @return the display coordinate (in widget coordinates)
113
virtual QPoint coordinateToDisplay(const QPointF& coordinate) const;
115
//! translates display coordinate to world coordinate
117
* The calculations also needs the current zoom. The current zoom is managed by the MapAdapter, so this is no problem.
118
* To divide model from view the current zoom should be moved to the layers.
119
* @param point the display coordinate
120
* @return the world coordinate
122
virtual QPointF displayToCoordinate(const QPoint& point) const;
124
virtual bool isTiled() const { return true; };
125
virtual QString projection() const;
127
virtual QMenu* getMenu() const { return NULL; }
129
virtual IImageManager* getImageManager();
130
virtual void setImageManager(IImageManager* anImageManager);
133
virtual int tilesonzoomlevel(int zoomlevel) const;
134
virtual int getyoffset(int y) const;
40
* This construct a Yahoo Adapter
42
YahooTiledMapAdapter();
43
virtual ~YahooTiledMapAdapter();
46
//! returns the unique identifier (Uuid) of this MapAdapter
48
* @return the unique identifier (Uuid) of this MapAdapter
50
virtual QUuid getId () const;
52
//! returns the type of this MapAdapter
54
* @return the type of this MapAdapter
56
virtual IMapAdapter::Type getType () const;
58
//! returns the name of this MapAdapter
60
* @return the name of this MapAdapter
62
virtual QString getName () const;
64
//! returns the host of this MapAdapter
66
* @return the host of this MapAdapter
68
virtual QString getHost () const;
70
//! returns the size of the tiles
72
* @return the size of the tiles
74
virtual int getTileSize () const;
76
//! returns the min zoom value
78
* @return the min zoom value
80
virtual int getMinZoom () const;
82
//! returns the max zoom value
84
* @return the max zoom value
86
virtual int getMaxZoom () const;
88
//! returns the current zoom
90
* @return the current zoom
92
virtual int getZoom () const;
94
virtual int getAdaptedZoom() const;
95
virtual int getAdaptedMinZoom () const;
96
virtual int getAdaptedMaxZoom () const;
98
virtual void zoom_in();
99
virtual void zoom_out();
101
virtual bool isValid(int x, int y, int z) const;
102
virtual QString getQuery(int x, int y, int z) const;
103
virtual QString getQuery(const QRectF& /* wgs84Bbox */, const QRectF& /* projBbox */, const QRect& /* size */) const { return ""; }
104
virtual QPixmap getPixmap(const QRectF& /* wgs84Bbox */, const QRectF& /* projBbox */, const QRect& /* size */) const { return QPixmap(); }
106
virtual QRectF getBoundingbox() const;
108
virtual bool isTiled() const { return true; }
109
virtual int getTilesWE(int zoom) const;
110
virtual int getTilesNS(int zoom) const;
111
virtual QString projection() const;
113
virtual QMenu* getMenu() const { return NULL; }
115
virtual IImageManager* getImageManager();
116
virtual void setImageManager(IImageManager* anImageManager);
118
virtual void cleanup() {}
138
IImageManager* theImageManager;
146
double numberOfTiles;
148
virtual QString getQ(QPointF ul, QPointF br) const;
122
IImageManager* theImageManager;
131
virtual QString getQ(QPointF ul, QPointF br) const;