SET(LIBDIR ${LIBDIR})
# Dependencies
-SET(dependents "glib-2.0 gmodule-2.0 libxml-2.0 dlog capi-network-connection capi-appfw-app-manager capi-maps-service capi-appfw-application vconf")
+SET(dependents
+ glib-2.0
+ gmodule-2.0
+ libxml-2.0
+ dlog
+ capi-maps-service
+ capi-network-connection
+ capi-appfw-app-manager
+ capi-appfw-application
+ evas
+ ecore-evas
+ elementary
+ vconf
+ )
INCLUDE(FindPkgConfig)
pkg_check_modules(pkgs REQUIRED ${dependents})
#define HERE_MAPS_LOG_DBG_INFO(fmt,args...) LOGD(fmt, ##args);
#define HERE_MAPS_LOG_ERROR(fmt,args...) LOGE(fmt, ##args);
#define HERE_MAPS_LOG_WARNING(fmt,args...) LOGW(fmt, ##args);
-#define HERE_MAPS_SECLOG(fmt,args...) SECURE_LOGD(fmt, ##args)
#define HERE_MAPS_RETURN_RESULT(cond,ret,fmt,args...)\
if (!cond) {\
class Canvas : public Object
{
public:
- typedef std::vector<FloatPoint*> tPoint;
- Canvas(void);
- virtual ~Canvas(void);
- result Construct(const BufferInfo& bufferInfo);
- result FillPolygon(const Color& color, const tPoint& points);
- result DrawPolyline(const tPoint& points);
- result SetLineWidth(int width);
- void SetForegroundColor(const Color& fgColor);
+
+ typedef std::vector<FloatPoint*> tPoint;
+ Canvas(void);
+ virtual ~Canvas(void);
+ result Construct(const BufferInfo& bufferInfo);
+ result FillPolygon(const Color& color, const tPoint& points);
+ result DrawPolyline(const tPoint& points);
+ result SetLineWidth(int width);
+ void SetForegroundColor(const Color& fgColor);
protected:
- void* _pNativeGfxEngine;
+ void* _pNativeGfxEngine;
private:
- unsigned long __ComposeColor(unsigned long color32, int opacity);
- void __SetColor(cairo_t* pCairo, unsigned long composedColor);
-
- unsigned long* __pBuffer;
- unsigned long __fgColor;
- int __lineWidth;
- cairo_operator_t __cairo_operator;
- Color __fgColorNative;
- int __fgOpacity;
+ unsigned long __ComposeColor(unsigned long color32, int opacity);
+ void __SetColor(cairo_t* pCairo, unsigned long composedColor);
+
+ unsigned long* __pBuffer;
+ unsigned long __fgColor;
+ int __lineWidth;
+ cairo_operator_t __cairo_operator;
+ Color __fgColorNative;
+ int __fgOpacity;
};
TIZEN_MAPS_END_NAMESPACE
unsigned int width,
unsigned int height);
- /**
+ /**
* This method renders a square, using the rectangle and texture specified
- * by the caller.
- *
+ * by the caller.
+ *
* @param aRect A constant reference to the rectangle to render.
- *
+ *
* @param rTexture A constant reference to the texture object to apply.
- *
+ *
* @param sx0 A value providing the x coordinate of the top left corner of
- * the rectangle in the tile grid.
- *
+ * the rectangle in the tile grid.
+ *
* @param sy0 A value providing the y coordinate of the top left corner of
* the rectangle in the tile grid.
- *
+ *
* @param sx1 A value providing the x coordinate of the bottom right corner of
* the rectangle in the tile grid.
- *
+ *
* @param sy1 A value providing the y coordinate of the bottom right corner of
* the rectangle in the tile grid.
*/
bool RenderQuad(const Tizen::Maps::FloatRectangle& aRect, const GlTexture& rTexture, float sx0=0.f, float sy0=1.f, float sx1=1.f, float sy1=0.f);
- /**
+ /**
* This method renders a square, using the rectangle and texture specified
- * by the caller.
- *
+ * by the caller.
+ *
* @param aRect A constant reference to the rectangle to render.
- *
+ *
* @param uTexture A value of the id of the texture object to apply.
- *
+ *
* @param sx0 A value providing the x coordinate of the top left corner of
- * the rectangle in the tile grid.
- *
+ * the rectangle in the tile grid.
+ *
* @param sy0 A value providing the y coordinate of the top left corner of
* the rectangle in the tile grid.
- *
+ *
* @param sx1 A value providing the x coordinate of the bottom right corner of
* the rectangle in the tile grid.
- *
+ *
* @param sy1 A value providing the y coordinate of the bottom right corner of
* the rectangle in the tile grid.
*/
here_error_e PrepareDiscoveryPreference(maps_preference_h hPref);
here_error_e PrepareDiscoveryFilter(maps_place_filter_h hFilter);
- here_error_e StartDiscoveryPlace(maps_coordinates_h hCoord, int nDistance);
+ here_error_e StartDiscoveryPlace(maps_coordinates_h hCoord, const int nDistance);
here_error_e StartDiscoveryPlace(maps_area_h hArea, const char *szAddr = "");
here_error_e StartDiscoveryPlaceList(maps_area_h hArea);
if (m_pQuery)
return HERE_ERROR_PERMISSION_DENIED;
- m_pQuery = new MultiReverseQuery();
+ m_pQuery = new (std::nothrow) MultiReverseQuery();
if (!m_pQuery)
return HERE_ERROR_OUT_OF_MEMORY;
if (!hCoord || nDistance < 0)
return HERE_ERROR_INVALID_PARAMETER;
+ int meters = (int)(HereUtils::ConvertDistance(nDistance, m_eDistanceUnit, MAPS_DISTANCE_UNIT_M) + 0.5);
maps_area_h area = NULL;
- maps_area_create_circle(hCoord, nDistance, &area);
+ maps_area_create_circle(hCoord, meters, &area);
here_error_e error = StartDiscoveryPlace(area);
maps_area_destroy(area);
return error;
}
/* distance */
- maps_place_set_distance(mapsPlace, HereUtils::ConvertDistance((int)herePlaceIt->GetDistance(), m_eDistanceUnit));
+ maps_place_set_distance(mapsPlace,
+ HereUtils::ConvertDistance((int)herePlaceIt->GetDistance(), m_eDistanceUnit) + 0.5);
/* sponser */
/* herePlaceList.GetIsSponsored() */
void HerePlace::__flushReplies(int error)
{
maps_place_h mapsPlace;
- maps_item_list_h place_list;
+ maps_item_list_h placeList = NULL;
m_nReplyIdx = 0;
__sortList(m_PlaceList);
}
else if (m_bReplyWithList)
{
- int error = maps_place_list_create(&place_list);
+ if (error == MAPS_ERROR_NONE)
+ error = maps_place_list_create(&placeList);
+
if (error != MAPS_ERROR_NONE)
{
+ if (placeList)
+ maps_place_list_destroy(placeList);
((maps_service_search_place_list_cb)m_pCbFunc)((maps_error_e)error, m_nReqId, 0, NULL, m_pUserData);
return;
}
mapsPlace = m_PlaceList.front();
m_PlaceList.pop_front();
- maps_item_list_append(place_list, mapsPlace, maps_place_clone);
+ maps_item_list_append(placeList, mapsPlace, maps_place_clone);
}
- ((maps_service_search_place_list_cb)m_pCbFunc)((maps_error_e)error, m_nReqId, maps_item_list_items(place_list), place_list, m_pUserData);
+ if (!m_bCanceled)
+ ((maps_service_search_place_list_cb)m_pCbFunc)((maps_error_e)error, m_nReqId, maps_item_list_items(placeList), placeList, m_pUserData);
+ else
+ maps_place_list_destroy(placeList);
}
else
{
+ if (error != MAPS_ERROR_NONE)
+ {
+ ((maps_service_search_place_cb)m_pCbFunc)((maps_error_e)error, m_nReqId, 0, 0, NULL, m_pUserData);
+ return;
+ }
+
while (m_nReplyIdx < m_nReplyCnt && !m_bCanceled && !m_PlaceList.empty())
{
mapsPlace = m_PlaceList.front();
case MAPS_SERVICE_CANCEL_REQUEST:
case MAPS_SERVICE_MULTI_REVERSE_GEOCODE:
case MAPS_SERVICE_SEARCH_PLACE_LIST:
+ case MAPS_SERVICE_SEARCH_GET_PLACE_DETAILS:
*supported = TRUE;
return MAPS_ERROR_NONE;
default: