Qt Mobility Reference Documentation

Location QML Plugin

Overview

The Location API gives users of the Qt Mobility Project the capability to write applications that understand a geographical location and movement of the position coordinates. Backend services can be called by the API to detect landmarks and display appropriate information. The QML Location Plugin delivers these capabilities in an easy to use form.

Positioning

Coordinate

The Coordinate is a basic unit of geographical information. The Coordinate element includes properties to hold the coordinate values for latitude, longitude and altitude.

Position

The three dimensional position of an object such as a mobile device can be specified by giving the latitude, longitude and altitude. That is the values held in the Coordinate element. Additionally for computation of future positions we would like to know if the object is moving, what speed it is doing and what is the timestamp of the last position data. Position therefore includes values for latitude, longitude, altitude, speed and a timestamp. Position also takes responsibility for validation of sensible values for these properties: just as there is a latitude there is a property latitudeValid. Similarly for the other properties with the exception of the timestamp.

PositionSource

We have a Position element, a Coordinate element but where do we get the data from? It is a good idea to be able to indicate alternative sources. Perhaps instead of directly picking up GPS satellites you want to do some testing using a datafile. We may also need to manage our interaction with the source.

The PositionSource element provides the developer with control, within the limits allowed by the platform, of the source of the geographical data. The positional data can be sourced from a logfile which is in NMEA format.

NMEA is a common text-based protocol for specifying navigational data. For convenience, the nmeaSource property is provided to enable QML applications to read NMEA data from a log file, the source will emit updates according to the time stamp of each NMEA sentence to produce a "replay" of the recorded data.

Positioning Elements

QML Address Element

The Address element presents an address.

QML BoundingBox Element

The QGeoBoundingBox class defines a rectangular geographic area.

QML Coordinate Element

The Coordinate element holds various positional data, such as latitude, longitude and altitude.

QML Landmark Element

The Landmark element presents one landmark.

QML LandmarkAbstractModel Element

The LandmarkAbstractModel element is an uncreatable / uninstantiable base element for LandmarkModel and LandmarkCategoryModel. It defines many common properties for the two models.

QML LandmarkBoxFilter Element

The LandmarkBoxFilter element specifies a box (rectangle) filter for landmark model.

QML LandmarkCategory Element

The LandmarkCategory element presents one landmark category.

QML LandmarkCategoryFilter Element

The LandmarkCategoryFilter element specifies a category filter for landmark model.

QML LandmarkCategoryModel Element

The LandmarkCategoryModel element provides access to categories.

QML LandmarkIntersectionFilter Element

The LandmarkIntersectionFilter element specifies an insection of landmark filters.

QML LandmarkModel Element

The LandmarkModel element provides access to landmarks.

QML LandmarkNameFilter Element

The LandmarkNameFilter element specifies a name filter for landmark model.

QML LandmarkProximityFilter Element

The LandmarkProximityFilter element specifies a proximity filter for landmark model.

QML LandmarkUnionFilter Element

The LandmarkUnionFilter element specifies a union of landmark filters.

QML Place Element

The A Place element presents basic information about a place.

QML Position Element

The Position element holds various positional data, such as coordinate (longitude, latitude, altitude) and speed.

QML PositionSource Element

The PositionSource element allows you to get information about your current position.

Maps

The Map element can be used be used to display a map of the world. The bulk of the functionality is provided by a mapping plugin described by the Plugin element associated with the Map.

Various map objects can be added to the map. These map objects are specified in terms of coordinates and metres.

Note: At the time of the Qt Mobility 1.1 release the QML support for the Maps and Navigation API is incomplete and likely to be refined and improved in the next patch release.

Map Elements

QML Map Element

The Map element displays a map.

QML MapCircle Element

The MapCircle element displays a circle on a map.

QML MapGroup Element

The MapGroup element aggregates a set of map objects.

QML MapImage Element

The MapImage element displays an image on a map.

QML MapPolygon Element

The MapPolygon element displays a polygon on a map.

QML MapPolyline Element

The MapPolyline element displays a polyline on a map.

QML MapRectangle Element

The MapRectangle element displays a rectangle on a map.

QML MapText Element

The MapText element displays text on a map.

QML Plugin Element

The Plugin element describes a Location based services plugin.

QML PluginParameter Element

The PluginParameter element describes the parameter to a Plugin.

X

Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.