diff options
author | Michal Klocek <michal.klocek@theqtcompany.com> | 2016-06-29 18:22:15 +0200 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2016-07-28 14:09:17 +0000 |
commit | 75dd424e11964d8755abdb1b12b27a8479353b37 (patch) | |
tree | 3b37b6b04e5bb813c9e0a17ebc314211c3b4b028 /src | |
parent | cd12d3c8eaf1c1a3dabfb50f88c635b9b1def3fc (diff) |
Add minimal map qml example
QtLocation was missnig basic example to show maps,
the one you can simply jump in and start hacking.
Change-Id: I0aec90ae25aa703d84f7e52e4dd523931819e79c
Reviewed-by: Paolo Angelelli <paolo.angelelli@theqtcompany.com>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/imports/location/qdeclarativegeomap.cpp | 32 | ||||
-rw-r--r-- | src/location/doc/images/api-map.png | bin | 62031 -> 0 bytes |
2 files changed, 9 insertions, 23 deletions
diff --git a/src/imports/location/qdeclarativegeomap.cpp b/src/imports/location/qdeclarativegeomap.cpp index 082eaf98..b220c899 100644 --- a/src/imports/location/qdeclarativegeomap.cpp +++ b/src/imports/location/qdeclarativegeomap.cpp @@ -134,31 +134,17 @@ QT_BEGIN_NAMESPACE \section2 Example Usage The following snippet shows a simple Map and the necessary Plugin type - to use it. The map is centered near Brisbane, Australia, zoomed out to the - minimum zoom level, with gesture interaction enabled. + to use it. The map is centered over Oslo, Norway, with zoom level 10. - \code - Plugin { - id: somePlugin - // code here to choose the plugin as necessary - } - - Map { - id: map - - plugin: somePlugin - - center { - latitude: -27 - longitude: 153 - } - zoomLevel: map.minimumZoomLevel - - gesture.enabled: true - } - \endcode + \quotefromfile minimal_map/main.qml + \skipto import + \printuntil } + \printline } + \skipto Map + \printuntil } + \printline } - \image api-map.png + \image minimal_map.png */ /*! diff --git a/src/location/doc/images/api-map.png b/src/location/doc/images/api-map.png Binary files differdeleted file mode 100644 index 6e7255d4..00000000 --- a/src/location/doc/images/api-map.png +++ /dev/null |