Landmarks API: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
'''English''' [[Landmarks API Spanish|Spanish]]
'''English''' [[Landmarks_API_Spanish|Spanish]]<br />[[Category:Developing with Qt::QtMobility]]


==Qt Mobility 1.1 Features==
== Qt Mobility 1.1 Features ==


==News==
== News ==


[http://labs.qt.nokia.com/2011/05/04/qt-4-7-3-and-qt-mobility-1-1-3-have-been-released/ Qt Mobility 1.1.3 Release] ''[labs.qt.nokia.com]'' is available now for commercial app development and deployment on Ovi store.<br />[http://labs.qt.nokia.com/2011/05/12/qt-mobility-1-2-0-released/ Qt Mobility 1.2.0 release] ''[labs.qt.nokia.com]'' is available now.
&quot;Qt Mobility 1.1.3 Release&amp;quot;:http://labs.qt.nokia.com/2011/05/04/qt-4-7-3-and-qt-mobility-1-1-3-have-been-released/ is available now for commercial app development and deployment on Ovi store.<br />&quot;Qt Mobility 1.2.0 release&amp;quot;:http://labs.qt.nokia.com/2011/05/12/qt-mobility-1-2-0-released/ is available now.


=Landmarks <span class="caps">API</span>=
= Landmarks API =


==Summary==
== Summary ==


One of the new elements of the Qt Mobility Location library is the Landmarks <span class="caps">API</span>. What is a landmark? A landmark is a particular location which holds some significance. It could be a favorite restaurant, a friend’s house or the Sydney Opera house. The landmarks <span class="caps">API</span> is designed to make the searching and management of such landmarks simple and easy to use.
One of the new elements of the Qt Mobility Location library is the Landmarks API. What is a landmark? A landmark is a particular location which holds some significance. It could be a favorite restaurant, a friend's house or the Sydney Opera house. The landmarks API is designed to make the searching and management of such landmarks simple and easy to use.


==Key features==
== Key features ==


* Save Landmark
* Save Landmark
Line 21: Line 21:
* Delete landmarks
* Delete landmarks
* Delete categories
* Delete categories
* Import landmarks (<span class="caps">GPX</span> version 1.1 currently supported)
* Import landmarks (GPX version 1.1 currently supported)
* ''Export landmarks''
* ''Export landmarks''
* Both asynchronous and synchronous <span class="caps">API</span>’s to perform the above operations
* Both asynchronous and synchronous API's to perform the above operations
* ''Generic attributes assignable to landmarks and categories.''
* ''Generic attributes assignable to landmarks and categories.''
* Plugin based backend allowing developers to create their own datastore back ends.
* Plugin based backend allowing developers to create their own datastore back ends.
Line 31: Line 31:
(Features in italics have yet to be implemented on the currently supported platforms)
(Features in italics have yet to be implemented on the currently supported platforms)


==Parts of the <span class="caps">API</span> that are still unstable:==
== Parts of the API that are still unstable: ==


Paging/QLandmarkFetchHint:<br /> Currently paging is facilitated through the QLandmarkFetchHint class which may be used to specify the maximum number of items to return and an offset. The QLandmarkFetchHint is intended to be an extendable catch-all part of the <span class="caps">API</span>. One of the possible use cases is to retrieve partial landmark data, e.g. only retrieve the icon and coordinates. The QLandmarkFetchHint would allow this specification to be made. For the sake of not having an empty class, the offset and maximum limit have been placed in the QLandmarkFetchHint. There may be a more elegant way to handling paging; we are open to suggestions on how this should be done.
Paging/QLandmarkFetchHint:<br />Currently paging is facilitated through the QLandmarkFetchHint class which may be used to specify the maximum number of items to return and an offset. The QLandmarkFetchHint is intended to be an extendable catch-all part of the API. One of the possible use cases is to retrieve partial landmark data, e.g. only retrieve the icon and coordinates. The QLandmarkFetchHint would allow this specification to be made. For the sake of not having an empty class, the offset and maximum limit have been placed in the QLandmarkFetchHint. There may be a more elegant way to handling paging; we are open to suggestions on how this should be done.


If there is demand for the partial landmark retrieval case we would also like to hear that. That particular use case may be important for situations where landmarks are retrieved over a network connection.
If there is demand for the partial landmark retrieval case we would also like to hear that. That particular use case may be important for situations where landmarks are retrieved over a network connection.


Synchronization:<br /> To facilitate synchronization between datastores it may be necessary to add new uid fields to each landmark and category. This differs from the local id field which should be unique per datastore but is not universally unique.
Synchronization:<br />To facilitate synchronization between datastores it may be necessary to add new uid fields to each landmark and category. This differs from the local id field which should be unique per datastore but is not universally unique.


Multiple database instances per plugin:<br /> The <span class="caps">API</span> as it currently stands only allows a single datastore instance per plugin. All applications using a particular plugin will effectively be sharing those landmarks. It may be desirable for each application to have it’s own separate landmark datastore.<br /> Please provide feedback if you want this functionality.
Multiple database instances per plugin:<br />The API as it currently stands only allows a single datastore instance per plugin. All applications using a particular plugin will effectively be sharing those landmarks. It may be desirable for each application to have it's own separate landmark datastore.<br />Please provide feedback if you want this functionality.


==LandmarkBrowser Example==
== LandmarkBrowser Example ==


The LandmarkBrowser is a simple application that displays a list of landmark coordinates and names.
The LandmarkBrowser is a simple application that displays a list of landmark coordinates and names.


[[Image:4829712737_a934e11864_b_d.jpg|LandmarkBrowser]]
[[Image:http://farm5.static.flickr.com/4075/4829712737_a934e11864_b_d.jpg|LandmarkBrowser]]


To add a new landmark click the add landmark button and a dialog box is shown allowing you to fill in the lattude, longitude and name fields.
To add a new landmark click the add landmark button and a dialog box is shown allowing you to fill in the lattude, longitude and name fields.
Line 51: Line 51:
To delete landmarks select which landmark(s) are to be deleted and press the delete landmarks button.
To delete landmarks select which landmark(s) are to be deleted and press the delete landmarks button.


To import landmarks click the import button and a dialog will be displayed allowing you to choose a <span class="caps">GPX</span> file (only version 1.1 is supported). A sample file called places.gpx already accompanies the LandmarkBrowser.
To import landmarks click the import button and a dialog will be displayed allowing you to choose a GPX file &amp;#40;only version 1.1 is supported&amp;amp;#41;. A sample file called places.gpx already accompanies the LandmarkBrowser.


===Categories:===
[[Category:Developing with Qt::QtMobility]]
 
* [[:Category:Developing with Qt|Developing_with_Qt]]
** [[:Category:Developing with Qt::QtMobility|QtMobility]]

Revision as of 11:12, 24 February 2015

English Spanish

Qt Mobility 1.1 Features

News

"Qt Mobility 1.1.3 Release&quot;:http://labs.qt.nokia.com/2011/05/04/qt-4-7-3-and-qt-mobility-1-1-3-have-been-released/ is available now for commercial app development and deployment on Ovi store.
"Qt Mobility 1.2.0 release&quot;:http://labs.qt.nokia.com/2011/05/12/qt-mobility-1-2-0-released/ is available now.

Landmarks API

Summary

One of the new elements of the Qt Mobility Location library is the Landmarks API. What is a landmark? A landmark is a particular location which holds some significance. It could be a favorite restaurant, a friend's house or the Sydney Opera house. The landmarks API is designed to make the searching and management of such landmarks simple and easy to use.

Key features

  • Save Landmark
  • Save Category
  • Retrieve landmarks based on a filter and sort order
  • Retrieve categories
  • Delete landmarks
  • Delete categories
  • Import landmarks (GPX version 1.1 currently supported)
  • Export landmarks
  • Both asynchronous and synchronous API's to perform the above operations
  • Generic attributes assignable to landmarks and categories.
  • Plugin based backend allowing developers to create their own datastore back ends.
  • Notifications of added/modified/deleted landmarks
  • Notifications of added/modified/deleted categories

(Features in italics have yet to be implemented on the currently supported platforms)

Parts of the API that are still unstable:

Paging/QLandmarkFetchHint:
Currently paging is facilitated through the QLandmarkFetchHint class which may be used to specify the maximum number of items to return and an offset. The QLandmarkFetchHint is intended to be an extendable catch-all part of the API. One of the possible use cases is to retrieve partial landmark data, e.g. only retrieve the icon and coordinates. The QLandmarkFetchHint would allow this specification to be made. For the sake of not having an empty class, the offset and maximum limit have been placed in the QLandmarkFetchHint. There may be a more elegant way to handling paging; we are open to suggestions on how this should be done.

If there is demand for the partial landmark retrieval case we would also like to hear that. That particular use case may be important for situations where landmarks are retrieved over a network connection.

Synchronization:
To facilitate synchronization between datastores it may be necessary to add new uid fields to each landmark and category. This differs from the local id field which should be unique per datastore but is not universally unique.

Multiple database instances per plugin:
The API as it currently stands only allows a single datastore instance per plugin. All applications using a particular plugin will effectively be sharing those landmarks. It may be desirable for each application to have it's own separate landmark datastore.
Please provide feedback if you want this functionality.

LandmarkBrowser Example

The LandmarkBrowser is a simple application that displays a list of landmark coordinates and names.

LandmarkBrowser

To add a new landmark click the add landmark button and a dialog box is shown allowing you to fill in the lattude, longitude and name fields.

To delete landmarks select which landmark(s) are to be deleted and press the delete landmarks button.

To import landmarks click the import button and a dialog will be displayed allowing you to choose a GPX file &#40;only version 1.1 is supported&amp;#41;. A sample file called places.gpx already accompanies the LandmarkBrowser.