Rev 674 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 674 | Rev 801 | ||
---|---|---|---|
1 | /* |
1 | /* |
2 | * |
2 | * |
3 | * This file is part of QMapControl, |
3 | * This file is part of QMapControl, |
4 | * an open-source cross-platform map widget |
4 | * an open-source cross-platform map widget |
5 | * |
5 | * |
6 | * Copyright (C) 2007 - 2008 Kai Winter |
6 | * Copyright (C) 2007 - 2008 Kai Winter |
7 | * |
7 | * |
8 | * This program is free software: you can redistribute it and/or modify |
8 | * This program is free software: you can redistribute it and/or modify |
9 | * it under the terms of the GNU Lesser General Public License as published by |
9 | * it under the terms of the GNU Lesser General Public License as published by |
10 | * the Free Software Foundation, either version 3 of the License, or |
10 | * the Free Software Foundation, either version 3 of the License, or |
11 | * (at your option) any later version. |
11 | * (at your option) any later version. |
12 | * |
12 | * |
13 | * This program is distributed in the hope that it will be useful, |
13 | * This program is distributed in the hope that it will be useful, |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | * GNU Lesser General Public License for more details. |
16 | * GNU Lesser General Public License for more details. |
17 | * |
17 | * |
18 | * You should have received a copy of the GNU Lesser General Public License |
18 | * You should have received a copy of the GNU Lesser General Public License |
19 | * along with QMapControl. If not, see <http://www.gnu.org/licenses/>. |
19 | * along with QMapControl. If not, see <http://www.gnu.org/licenses/>. |
20 | * |
20 | * |
21 | * Contact e-mail: kaiwinter@gmx.de |
21 | * Contact e-mail: kaiwinter@gmx.de |
22 | * Program URL : http://qmapcontrol.sourceforge.net/ |
22 | * Program URL : http://qmapcontrol.sourceforge.net/ |
23 | * |
23 | * |
24 | */ |
24 | */ |
25 | 25 | ||
26 | #ifndef GOOGLESATMAPADAPTER_H |
26 | #ifndef GOOGLESATMAPADAPTER_H |
27 | #define GOOGLESATMAPADAPTER_H |
27 | #define GOOGLESATMAPADAPTER_H |
28 | 28 | ||
29 | #include "tilemapadapter.h" |
29 | #include "tilemapadapter.h" |
- | 30 | ||
30 | namespace qmapcontrol |
31 | namespace qmapcontrol |
31 | { |
32 | { |
32 | //! MapAdapter for Google |
33 | //! MapAdapter for Google |
33 | /*! |
34 | /*! |
34 | * This is a conveniece class, which extends and configures a TileMapAdapter |
35 | * This is a conveniece class, which extends and configures a TileMapAdapter |
35 | * @author Kai Winter <kaiwinter@gmx.de> |
36 | * @author Kai Winter <kaiwinter@gmx.de> |
36 | */ |
37 | */ |
37 | class GoogleSatMapAdapter : public TileMapAdapter |
38 | class GoogleSatMapAdapter : public TileMapAdapter |
38 | { |
39 | { |
39 | Q_OBJECT |
40 | Q_OBJECT |
- | 41 | ||
40 | public: |
42 | public: |
41 | //! constructor |
43 | //! constructor |
42 | /*! |
44 | /*! |
43 | * This construct a Google Adapter |
45 | * This construct a Google Adapter |
44 | */ |
46 | */ |
45 | GoogleSatMapAdapter(); |
47 | GoogleSatMapAdapter(); |
46 | virtual ~GoogleSatMapAdapter(); |
48 | virtual ~GoogleSatMapAdapter(); |
47 | - | ||
48 | virtual QPoint coordinateToDisplay(const QPointF&) const; |
- | |
49 | virtual QPointF displayToCoordinate(const QPoint&) const; |
- | |
50 | - | ||
51 | //! returns the host of this MapAdapter |
- | |
52 | /*! |
- | |
53 | * @return the host of this MapAdapter |
- | |
54 | */ |
- | |
55 | QString getHost () const; |
- | |
56 | - | ||
57 | - | ||
58 | protected: |
- | |
59 | virtual void zoom_in(); |
- | |
60 | virtual void zoom_out(); |
- | |
61 | virtual QString query(int x, int y, int z) const; |
- | |
62 | virtual bool isValid(int x, int y, int z) const; |
- | |
63 | - | ||
64 | private: |
- | |
65 | virtual QString getQ(qreal longitude, qreal latitude, int zoom) const; |
- | |
66 | qreal getMercatorLatitude(qreal YCoord) const; |
- | |
67 | qreal getMercatorYCoord(qreal lati) const; |
- | |
68 | - | ||
69 | qreal coord_per_x_tile; |
- | |
70 | qreal coord_per_y_tile; |
- | |
71 | int srvNum; |
- | |
72 | }; |
49 | }; |
73 | } |
50 | } |
74 | #endif |
51 | #endif |
75 | 52 |