From: chanywa Date: Thu, 22 Sep 2016 07:17:17 +0000 (+0900) Subject: [3.0][common_appcontrol] Add comments about APP_CONTROL_DATA_LOCATION in Map part... X-Git-Tag: tizen_3.0/TD_SYNC/20161201~48 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9f9cdd493dd376be64b63cc05266926cfcce9a38;p=sdk%2Fonline-doc.git [3.0][common_appcontrol] Add comments about APP_CONTROL_DATA_LOCATION in Map part, and modified the example codes Change-Id: I5e9c858f85eb1a8e054ba3995e0e21022490ad16 Signed-off-by: chanywa --- diff --git a/org.tizen.guides/html/native/app_management/common_appcontrol_n.htm b/org.tizen.guides/html/native/app_management/common_appcontrol_n.htm index 316a209..5bb91b4 100644 --- a/org.tizen.guides/html/native/app_management/common_appcontrol_n.htm +++ b/org.tizen.guides/html/native/app_management/common_appcontrol_n.htm @@ -1463,8 +1463,8 @@ show_maps_operation(void)

Show the map at the location of a given keyword (address or POI). For example: geo:0,0?q=Eiffel%20Tower

All strings passed in the geo: URI must be encoded.

If only geo: is used, it filters out all but map applications in the system, and the location to be shown depends on the application scenario and configuration.

- - + +

Extra Input

@@ -1475,8 +1475,8 @@ show_maps_operation(void) - - + +
APP_CONTROL_DATA_TYPEThe type of items to be delivered. Available values are address (default), image, poi, or all. This key must be passed as a string.This key is optional. The poi value is not supported in Tizen 2.4.The type of items to be delivered. Available values are address (default), image, poi, geocode, or all. This key must be passed as a string.This key is optional. The poi value is not supported in Tizen 2.4. The geocode value is supported since Tizen 3.0.
@@ -1498,15 +1498,20 @@ show_maps_operation(void) APP_CONTROL_DATA_NAME The name of the selected location. This key must be passed as a string. This key is not supported in Tizen 2.4. - + + + APP_CONTROL_DATA_LOCATION + The geo-coordinates of the selected location. This key must be passed as a string. + This key is supported since Tizen 3.0. + APP_CONTROL_DATA_PATH The file path of the image showing the selected location. This key must be passed as a string. - + - - + +

Example Code

 #include <app_control.h>
@@ -1528,7 +1533,7 @@ pick_location_operation(void)
 
     app_control_set_operation(service, APP_CONTROL_OPERATION_PICK);
     app_control_set_uri(service, "geo:0,0?q=Eiffel Tower");
-    app_control_add_extra_data(service, APP_CONTROL_DATA_TYPE, "poi");
+    app_control_add_extra_data(service, APP_CONTROL_DATA_TYPE, "all");
     app_control_set_launch_mode(service, APP_CONTROL_LAUNCH_MODE_GROUP);
 
     app_control_send_launch_request(service, pick_reply_cb, NULL);
@@ -1541,16 +1546,24 @@ void
 pick_reply_cb(app_control_h request, app_control_h reply, app_control_result_e result, void *user_data)
 {
     char *address = NULL;
+    char *name = NULL;
+    char *geocode = NULL;
     char *path = NULL;
 
     if (result == APP_CONTROL_RESULT_SUCCEEDED) {
         app_control_get_extra_data(reply, APP_CONTROL_DATA_SELECTED, &address);
+        app_control_get_extra_data(reply, APP_CONTROL_DATA_NAME, &name);
+        app_control_get_extra_data(reply, APP_CONTROL_DATA_LOCATION, &geocode);
         app_control_get_extra_data(reply, APP_CONTROL_DATA_PATH, &path);
 
         dlog_print(DLOG_INFO, LOG_TAG, "Selected address: %s", address);
+        dlog_print(DLOG_INFO, LOG_TAG, "Selected name: %s", name);
+        dlog_print(DLOG_INFO, LOG_TAG, "Selected location: %s", geocode);
         dlog_print(DLOG_INFO, LOG_TAG, "Map image path: %s", path);
 
         free(address);
+        free(name);
+        free(geocode);
         free(path);
     }
 }
@@ -2474,4 +2487,4 @@ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga
 
 
 
-	
\ No newline at end of file
+