summaryrefslogtreecommitdiff
path: root/doc/src/qml-position.qdoc
blob: e142063b381c582a03ebdb034373b586c3390a9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/****************************************************************************
**
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:FDL$
** GNU Free Documentation License
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
** this file.
**
** Other Usage
** Alternatively, this file may be used in accordance with the terms
** and conditions contained in a signed written agreement between you
** and Nokia.
**
**
**
**
**
** $QT_END_LICENSE$
**
****************************************************************************/

/*!
\page location-positioning-qml.html

\title Positioning (QML)
\previouspage {qtlocation-module.html}{QtLocation}

\brief The Location Positioning API enables location positioning by means of
GPS or an NMEA data source.

\section1 Location Positioning

Location data involves a precisely specified position on the Earth's
surface \unicode {0x2014} as provided by a latitude-longitude coordinate
\unicode {0x2014} along with associated data, such as:

    \list
    \o The date and time at which the position was reported
    \o The velocity of the device that reported the position
    \o The altitude of the reported position (height above sea level)
    \o The bearing of the device in degrees, relative to true north
    \endlist

This data can be extracted through a variety of methods. One of the most
well known methods of positioning is GPS (Global Positioning System), a
publicly available system that uses radiowave signals received from
Earth-orbiting satellites to calculate the precise position and time of
the receiver. Another popular method is Cell ID positioning, which uses
the cell ID of the cell site that is currently serving the receiving
device to calculate its approximate location. These and other positioning
methods can all be used with the Location API; the only requirement for a
location data source within the API is that it provides a
latitude-longitude coordinate with a date/time value, with the option of
providing the other attributes listed above.

\section2 Example: Centering the map on the current position

Here is an example of a client that uses a \l{PositionSource}{position source}
to center a \l{Map}{map} on the current position:

\code
Rectangle {

    map : Map {
        // initialize map
    }

    PositionSource {
        onPositionChanged: {
            // center the map on the current position
            map.center = position.coordinate
        }
    }
}
\endcode


\section2 \bold{Flickr Example}

The \l{Flickr (QML)}{Flickr Example} uses the Location to download thumbnail
images from Flickr relevant to the current location.


\section1 Location Position classes

\annotatedlist qml-QtLocation5-positioning
*/