changed attributes of header files
[platform/core/location/maps-plugin-here.git] / inc / engine / maps / GeoMapObjectMarker.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 MAPOBJECTMARKER_H
19 #define MAPOBJECTMARKER_H
20
21 #include "common/HereMaps_global.h"
22 #ifndef TIZEN_MIGRATION
23 #include <FGraphics.h>
24 #endif
25
26 #include "maps/GeoMapObject.h"
27 #ifdef TIZEN_MIGRATION
28 #include "graphic/Dimension.h"
29 #include "graphic/Point.h"
30 #include "graphic/Bitmap.h"
31 #include "graphic/FloatPoint.h"
32 #endif
33
34 HERE_MAPS_BEGIN_NAMESPACE
35
36 class GlTexture;
37 class GeoCoordinates;
38
39 /**
40  * This class encapsulates a map marker object that indicates a location 
41  * with an image (icon).
42  *
43  * \ingroup maps
44  */
45 class EXPORT_API GeoMapObjectMarker : public GeoMapObject
46 {
47 public:
48
49     /**
50      * This method is the default constructor.
51      */
52     GeoMapObjectMarker();
53
54     /**
55      * This method is the (virtual) destructor.
56      */
57     virtual ~GeoMapObjectMarker();
58
59     /**
60      * This method retrieves the object type.
61      * 
62      * @return A member of the enumerated data type indicating the type of the
63      *        given object.
64      */
65     virtual Type GetType() const;
66
67     /**
68      * This method retrieves the object bounding box.
69      * 
70      * @return An object encapsulating the bounding box of the given object.
71      */
72     virtual GeoBoundingBox GetBoundingBox() const;
73
74     /**
75      * This method sets the position of the given object.
76      *
77      * @param rCoord A constant reference to an object containing the geographic
78      *        coordinates of the position of the given object.
79      */
80     virtual void SetPosition(const GeoCoordinates& rCoord);
81
82     /**
83      * This method retrieves the position of the given object.
84      *
85      * @return A constant reference to an object containing the geographic
86      *        coordinates of the position of the given object.
87      */
88     const GeoCoordinates& GetPosition() const;
89
90     /**
91      * This method sets the marker image (icon).
92      * 
93      * @param rBitmap A constant reference to an object encapsulating the icon
94      *        image.  
95      */
96     void SetBitmap(const Tizen::Maps::Bitmap& rBitmap);
97
98     /**
99      * This method retrieves the width of the bitmap (icon). 
100      * 
101      * @return A value indicating the width of the bitmap (icon) in pixels.
102      */
103     unsigned int GetWidth() const;
104
105     /**
106      * This method retrieves the height of the bitmap (icon). 
107      * 
108      * @return A value indicating the height of the bitmap (icon) in pixels.
109      */
110     unsigned int GetHeight() const;
111
112     /**
113      * This method sets a value that defines the point on the marker bitmap that
114      * touches the map. The point is calculated relative to the top-left corner
115      * of the bitmap.
116      * 
117      * @param rOrigin A floating point value defining the origin.
118      */
119     void SetMarkerOrigin(const Tizen::Maps::FloatPoint& rOrigin);
120
121     /**
122      * This method retrieves a value that represents the point on the marker
123      * bitmap that "touches" the map. The point is calculated relative to the
124      * top-left corner of the bitmap.
125      * 
126      * @return A floating point value defining the bitmap origin.
127      */
128     Tizen::Maps::FloatPoint GetMarkerOrigin() const;
129
130     /**
131      * This method retrieves a value that represents the point on the marker
132      * bitmap that "touches" the map. The point is calculated relative to the
133      * top-left corner of the bitmap.
134      * 
135      * @return An object containing the pixel coordinates of the bitmap origin
136      *        relative to the top-left corner of the bitmap.
137      */
138     Tizen::Maps::Point GetMarkerOriginInPx() const;
139
140     /**
141      * This method retrieves the marker bitmap as a GL texture.
142      * 
143      * @return A pointer to the GL texture of the bitmap.
144      */
145     GlTexture* GetGlTexture() const;
146
147     /**
148      * This method checks if the object is valid (it geographic location is
149      * defined). 
150      *
151      * @return visible A Boolean, <code>true</code> if the object is valid,
152      *        otherwise <code>false</code>.
153      */
154     virtual bool IsValid() const;
155
156 #ifdef TIZEN_MIGRATION
157     /**
158      * This method retrieves the marker z-order.
159      *
160      * @return A value indicating z-order to the bitmap.
161      */
162     int GetZOrder() const;
163
164     /**
165      * This method sets the marker z-order.
166      *
167      * @param nZorder A constant value of z-order.
168      */
169     void SetZOrder(int nZorder);
170 #endif
171
172 private:
173     HERE_MAPS_NO_COPY_NO_ASSIGN(GeoMapObjectMarker);
174
175     class GeoMapObjectMarkerImpl;
176     GeoMapObjectMarkerImpl* m_impl;
177 };
178
179 HERE_MAPS_END_NAMESPACE
180
181 #endif