<p>Show the map at the location of a given keyword (address or POI). For example: <span style="font-family: Courier New,Courier,monospace">geo:0,0?q=Eiffel%20Tower</span></p>
<p>All strings passed in the <span style="font-family: Courier New,Courier,monospace">geo:</span> URI must be encoded.</p>
<p>If only <span style="font-family: Courier New,Courier,monospace">geo:</span> 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.</p>
-
-
+
+
<h4>Extra Input</h4>
<table>
<tbody>
</tr>
<tr>
<td><span style="font-family: Courier New,Courier,monospace">APP_CONTROL_DATA_TYPE</span></td>
- <td>The type of items to be delivered. Available values are <span style="font-family: Courier New,Courier,monospace">address</span> (default), <span style="font-family: Courier New,Courier,monospace">image</span>, <span style="font-family: Courier New,Courier,monospace">poi</span>, or <span style="font-family: Courier New,Courier,monospace">all</span>. This key must be passed as a string.</td>
- <td>This key is optional. <strong>The poi value is not supported in Tizen 2.4.</strong></td>
+ <td>The type of items to be delivered. Available values are <span style="font-family: Courier New,Courier,monospace">address</span> (default), <span style="font-family: Courier New,Courier,monospace">image</span>, <span style="font-family: Courier New,Courier,monospace">poi</span>, <span style="font-family: Courier New,Courier,monospace">geocode</span>, or <span style="font-family: Courier New,Courier,monospace">all</span>. This key must be passed as a string.</td>
+ <td>This key is optional. <strong>The poi value is not supported in Tizen 2.4.</strong> <strong>The geocode value is supported since Tizen 3.0.</strong></td>
</tr>
</tbody>
</table>
<td><span style="font-family: Courier New,Courier,monospace">APP_CONTROL_DATA_NAME</span></td>
<td>The name of the selected location. This key must be passed as a string.</td>
<td><strong>This key is not supported in Tizen 2.4.</strong></td>
- </tr>
+ </tr>
+ <tr>
+ <td><span style="font-family: Courier New,Courier,monospace">APP_CONTROL_DATA_LOCATION</span></td>
+ <td>The geo-coordinates of the selected location. This key must be passed as a string.</td>
+ <td><strong>This key is supported since Tizen 3.0.</strong></td>
+ </tr>
<tr>
<td><span style="font-family: Courier New,Courier,monospace">APP_CONTROL_DATA_PATH</span></td>
<td>The file path of the image showing the selected location. This key must be passed as a string.</td>
<td></td>
- </tr>
+ </tr>
</tbody>
- </table>
-
+ </table>
+
<h4>Example Code</h4>
<pre class="prettyprint">
#include <app_control.h>
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);
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);
}
}
</script>
</body>
-</html>
\ No newline at end of file
+</html>