maps_view_object_h hOverlay = NULL;
double dX = 0.0, dY = 0.0;
int nLoopCount;
- Evas_Object *win = NULL;
+ elm_init(0, NULL);
+ elm_config_accel_preference_set("opengl");
+ elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
- win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
+ Evas_Object * win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
elm_win_autodel_set(win, TRUE);
Evas_Object *object = elm_button_add(win);
bool bMapsFeatureSupported = TCTCheckSystemInfoFeatureSupported(MAPS_FEATURE, API_NAMESPACE);
+
maps_view_overlay_type_e eMapViewOverlayType[] = { MAPS_VIEW_OVERLAY_NORMAL, /**< Indicates the normal type */
- MAPS_VIEW_OVERLAY_BUBBLE, /**< Indicates the bubble type */
+ MAPS_VIEW_OVERLAY_BUBBLE, /**< Indicates the bubble type */
MAPS_VIEW_OVERLAY_BOX}; /**< Indicates the box type */
int nMapViewOverlayArraySize = sizeof(eMapViewOverlayType) / sizeof(eMapViewOverlayType[0]);
- int nRet = maps_coordinates_create(dX, dY, &hCoord);
- if ( false == bMapsFeatureSupported)
- {
- if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
- {
- FPRINTF("[Line : %d][%s] maps_coordinates_create API call returned mismatch %s error for unsupported maps feature\\n", __LINE__, API_NAMESPACE, MapServiceGetError(nRet));
- return 1;
- }
- else
- {
- FPRINTF("[Line : %d][%s] maps_coordinates_create API call correctly returned %s error for unsupported maps feature\\n", __LINE__, API_NAMESPACE, MapServiceGetError(nRet));
- return 0;
- }
- }
- PRINT_RESULT(MAPS_ERROR_NONE, nRet, "maps_coordinates_create", MapServiceGetError(nRet));
- CHECK_HANDLE(hCoord, "maps_coordinates_create");
+
for(nLoopCount = 0; nLoopCount < nMapViewOverlayArraySize; nLoopCount++)
{
+ int nRet = maps_coordinates_create(0.0,0.0, &hCoord);
+ if ( false == bMapsFeatureSupported)
+ {
+ if ( nRet != TIZEN_ERROR_NOT_SUPPORTED )
+ {
+ FPRINTF("[Line : %d][%s] maps_coordinates_create API call returned mismatch %s error for unsupported maps feature\\n", __LINE__, API_NAMESPACE, MapServiceGetError(nRet));
+ return 1;
+ }
+ else
+ {
+ FPRINTF("[Line : %d][%s] maps_coordinates_create API call correctly returned %s error for unsupported maps feature\\n", __LINE__, API_NAMESPACE, MapServiceGetError(nRet));
+ return 0;
+ }
+ }
+ PRINT_RESULT(MAPS_ERROR_NONE, nRet, "maps_coordinates_create", MapServiceGetError(nRet));
+ CHECK_HANDLE(hCoord, "maps_coordinates_create");
+
nRet = maps_view_object_create_overlay(hCoord, object, eMapViewOverlayType[nLoopCount], &hOverlay);
+
PRINT_RESULT_CLEANUP(MAPS_ERROR_NONE, nRet, "maps_view_object_create_overlay", MapServiceGetError(nRet), maps_coordinates_destroy(hCoord));
CHECK_HANDLE_CLEANUP(hOverlay, "maps_view_object_create_overlay", maps_coordinates_destroy(hCoord));
nRet = maps_view_object_destroy(hOverlay);
PRINT_RESULT_NORETURN(MAPS_ERROR_NONE, nRet, "maps_view_object_destroy", MapServiceGetError(nRet));
}
-
- nRet = maps_coordinates_destroy(hCoord);
- PRINT_RESULT_NORETURN(MAPS_ERROR_NONE, nRet, "maps_coordinates_destroy", MapServiceGetError(nRet));
+ elm_shutdown();
+ win = NULL;
return 0;
}
int nSetZoomLevel = 2;
int nGetZoomLevel;
bool bMapsFeatureSupported = TCTCheckSystemInfoFeatureSupported(MAPS_FEATURE, API_NAMESPACE);
-
+
+ elm_init(0, NULL);
+ elm_config_accel_preference_set("opengl");
+
+ elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
win = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
elm_win_autodel_set(win, TRUE);
Evas_Object *object = elm_button_add(win);
-
+
int nRet = maps_coordinates_create(dX, dY, &hCoord);
if ( false == bMapsFeatureSupported)
{
{
FPRINTF("[Line : %d][%s] Mismatch in set and get zoom level \\n", __LINE__, API_NAMESPACE);
maps_view_object_destroy(hOverlay);
- maps_coordinates_destroy(hCoord);
return 1;
}
nRet = maps_view_object_destroy(hOverlay);
PRINT_RESULT_NORETURN(MAPS_ERROR_NONE, nRet, "maps_view_object_destroy", MapServiceGetError(nRet));
-
- nRet = maps_coordinates_destroy(hCoord);
- PRINT_RESULT_NORETURN(MAPS_ERROR_NONE, nRet, "maps_coordinates_destroy", MapServiceGetError(nRet));
-
+
return 0;
}
remove(ERR_LOG);
}
+
bool bMapsFeatureSupported = TCTCheckSystemInfoFeatureSupported(MAPS_FEATURE, API_NAMESPACE);
+
elm_init(0,NULL);
elm_config_accel_preference_set("opengl");
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
+
g_pEvasWin = elm_win_add(NULL, "sample", ELM_WIN_BASIC);
if(g_pEvasWin == NULL)
{
g_CheckInitErr = false;
return;
}
- nRet = maps_view_create(g_HandleMapService, g_hImage, &g_HandleMapView);
+ nRet = maps_view_create(g_HandleMapService, g_pEvasWin, &g_HandleMapView);
+
if ( nRet != MAPS_ERROR_NONE || g_HandleMapView == NULL)
{
FPRINTF("[Line : %d][%s] maps_service_create fail in startup error returned : %s \\n", __LINE__, API_NAMESPACE , MapServiceGetError(nRet));
int nRet = maps_view_set_event_cb(g_HandleMapView, MAPS_VIEW_EVENT_GESTURE, MapsViewEventCb, NULL);
PRINT_RESULT(MAPS_ERROR_NONE, nRet, "maps_view_set_event_cb", MapServiceGetError(nRet));
- nRet = maps_view_unset_event_cb(MapsViewEventCb, MAPS_VIEW_EVENT_GESTURE);
+ nRet = maps_view_unset_event_cb(g_HandleMapView, MAPS_VIEW_EVENT_GESTURE);
PRINT_RESULT(MAPS_ERROR_NONE, nRet, "maps_view_unset_event_cb", MapServiceGetError(nRet));
return 0;