changed attributes of header files
[platform/core/location/maps-plugin-here.git] / inc / engine / internal / GeoMercatorProjection.h
1 /*
2  * Copyright (C) 2013 HERE Global B.V. All rights reserved.
3  * This software, including documentation, is protected by copyright controlled by
4  * HERE Global B.V. (“Software”). All rights are reserved. Copying, including reproducing,
5  * storing, adapting or translating, any or all of this material requires the prior
6  * written consent of HERE Global B.V. You may use this
7  * Software in accordance with the terms and conditions defined in the
8  * HERE Location Platform Services Terms and Conditions, available at
9  * http://developer.here.com/terms-conditions-base
10  *
11  * As an additional permission to the above, you may distribute Software,
12  * in object code format as part of an Application, according to, and subject to, terms and
13  * conditions defined in the Tizen Software Development kit (“SDK”) License Agreement.
14  * You may distribute such object code format Application under terms of your choice,
15  * provided that the header and source files of the Software have not been modified.
16  */
17
18 #ifndef GEOMERCATORPROJECTION_H
19 #define GEOMERCATORPROJECTION_H
20
21 #include <cmath>
22
23 #ifdef TIZEN_OSP_BASED
24 #include <FGraphics.h>
25 #endif
26
27 #include "common/HereMaps_global.h"
28 #include "maps/GeoProjection.h"
29 #include "internal/DoublePoint.h"
30 #include "internal/DoublePoint3.h"
31
32 HERE_MAPS_BEGIN_NAMESPACE
33
34
35 /**
36  * This class encapsulates the normalized mercator projection. In this
37  * projection, the map is represented by a grid of square tiles (bitmap
38  * images). The position of the tile in this grid depends on the map zoom level
39  * and is defined by the x and y coordinates. At the lowest zoom level, there is
40  * only one tile. At the next zoom level, the grid is 2 x 2. With each higher
41  * zoom level the x-size and the y-size of the grid increase by a power of two.
42  * 
43  * \ingroup maps
44  */
45
46 class GeoMercatorProjection : public GeoProjection
47 {
48 public:
49     GeoMercatorProjection();
50
51     virtual void setTileSize(const Tizen::Maps::Dimension& size);
52     virtual void setScreenSize(const Tizen::Maps::Dimension& size);
53     virtual void setLevel(double value);
54     virtual void setGeoCenter(const GeoCoordinates& value);
55     virtual void setHeading(double value);
56     virtual bool setGeoCenterInPx(const Tizen::Maps::Point& value);
57     virtual Tizen::Maps::Point geoToPixel(const GeoCoordinates& geo) const;
58     virtual GeoCoordinates pixelToGeo(const Tizen::Maps::Point &pixel) const;
59     virtual std::vector<GeoProjectionNode*> projectRoot();
60
61 protected:
62     virtual GeoProjectionNode* createNodeAt(double left_x, double bottom_y);
63     virtual void filter(GeoProjectionNode& transform,const std::vector<DoublePoint3>& points);
64     virtual DoublePoint3 projectPoint(double x, double y, double z = 0.0) const;
65
66 private:
67     HERE_MAPS_NO_COPY_NO_ASSIGN(GeoMercatorProjection);
68
69     void createProjection();
70 };
71
72 HERE_MAPS_END_NAMESPACE
73
74 #endif // GEOMERCATORPROJECTION_P_H