summaryrefslogtreecommitdiffstats
path: root/src/location/declarativemaps
Commit message (Collapse)AuthorAgeFilesLines
...
* Prevent QList detaching in for loops in QDeclarativeGeoMapPaolo Angelelli2017-04-111-3/+3
| | | | | | | Using qAsConst where possible to prevent QList from detaching. Change-Id: Ief03fb17761e350335f945b7134cf4a9266971d7 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Protect QGeoMap pointer with QPointerPaolo Angelelli2017-04-114-17/+18
| | | | | | | | | | | | m_map inside QDeclarativeGeoMap is created, but also destroyed, by the engine. In some cases (dynamic QML object creation/destruction) the engine may disappear before the Map. This patch introduces a QPointer to prevent a dangling pointer Change-Id: Ice3c57b4dbeb96ee8d7e4d401654b9085c105dec Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Doc: Complete parameter documentationNico Vertriest2017-04-101-1/+1
| | | | | | | | | | | qdeclarativegeomap.cpp: 1327: warning: Can't link to 'Component.onCompleted' qgeopath.cpp:117: warning: Undocumented parameter 'width' in QGeoPath::QGeoPath() qgeopath.cpp:117: warning: Undocumented parameter 'path' in QGeoPath::QGeoPath() qgeoshape.cpp:90: warning: Undocumented enum item 'PathType' in QGeoShape::ShapeType qgeoshape.cpp:231: warning: No such parameter 'QGeoRectangle' in QGeoShape::boundingGeoRectangle() Change-Id: Ie57dff2aabe82d61b8122362a396ac706939c3b3 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Rename libclipper namespaceThiago Marcos P. Santos2017-04-102-3/+3
| | | | | | | | | | | So it won't clash with the libclipper used by the Mapbox GL plugin when linking Qt with -static. With -static, all the plugins are linked together instead of each one having its own shared library, thus, hiding private symbols. Change-Id: I33ee4afd4b83741c5f3fae32a88da7f4a7fee75f Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Trigger manually map update after initializationKarol Polak2017-04-101-0/+6
| | | | | | | | If all of the tiles were loaded from cache and plugin for the map was set after creation of the declarative map, it can occur that item is not updated Task-number: QTBUG-60021 Change-Id: I260b6219b65ef16726aa767d3a83c6fc756642b5 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Update location screenshotsThiago Marcos P. Santos2017-04-061-1/+1
| | | | | | | | Better rendering using Mapbox GL plugin. Change-Id: I3ef1862988e652c1caad62920c2f3b5775f18552 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io> Reviewed-by: Bruno de Oliveira Abinader <brunoabinader@gmail.com>
* Improve flicking behavior of QQuickGeoMapGestureAreaPaolo Angelelli2017-04-032-51/+37
| | | | | | | | | This patch replaces the two separate flick velocities and displacements for x and y with one vector , so that there will be no discrepancy between the flicking direction and where the map actually flicks Change-Id: I83164107003a423cb7332da5759d83ff689c1b31 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix rotation gesture startPaolo Angelelli2017-03-271-2/+2
| | | | | | | | | | This patch makes the rotation gesture start more smoothly instead of abruptingly start with an initial rotation equal to starting angle threshold, once this threshold angle has been trespassed. Change-Id: I2be52fa53f50151b9b87244a1b53ca4105121a8b Reviewed-by: Bruno de Oliveira Abinader <brunoabinader@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Check for map in map item's geometryChangedPaolo Angelelli2017-03-274-4/+4
| | | | | | | | | Add additional sanity checks to do the geometry changing only if the map() has been set already (that is, the item has been added to the map) Change-Id: Id5b5faa41c68c80c3ad322f408b7a8abe5d2f7ab Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Consider keepTouchGrab when handing mouse events in QDeclarativeGeoMapPaolo Angelelli2017-03-241-2/+2
| | | | | | | | | | QDeclarativeGeoMap used to consider only keepMouseGrab. Some components only set keepTouchGrab. With this patch both are considered Task-number: QTBUG-59416 Change-Id: Ie551c9a207cdac144fd760b863fc5fafd4c21274 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Remove pathPropertyChanged() from Polyline,PolygonPaolo Angelelli2017-03-222-2/+0
| | | | | | | This private method is not even implemented. Change-Id: I30c0e559d0264f1b0eb6d394c9675879b23be44e Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Cache coordinate projections in map itemsPaolo Angelelli2017-03-228-68/+165
| | | | | | | | | | | | This patch caches the result of geoToMapProjection() for the coordinates of the map items, regenerating this data only upon coordinate changes. This allows avoiding to perform a (mercator) projection basically every time the item has to be drawn, and instead do only the wrapping around the camera center and the projection to screen Task-number: QTBUG-59479 Change-Id: Iea5ec04f360d2fe7495cd9c1dd278e83200e0f8d Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Correctly handle pinch, rotation and tilt gestures in map gesture areaPaolo Angelelli2017-03-222-43/+111
| | | | | | | | | This patch reworks the logic for handling the touch gestures. Now tilt can kick in after parallel panning, making it easier to achieve it. Change-Id: I528f146fd80532bbc8b97f8f92b8c1a38c40a710 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Fix for disappearing MapQuickItems with tilted cameraPaolo Angelelli2017-03-222-4/+30
| | | | | | | | | | | This patch fixes a bug that makes MapQuickItem disappear when the zoomLevel property is set, the camera is tilted and zoomed in very close to the item, causing the coordinate of the map quick item to end behind the camera. Task-number: QTBUG-59397 Change-Id: Iae92204917729eb9daaf8592db318613bf57b966 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Minor build cleanupsBruno de Oliveira Abinader2017-03-211-0/+1
| | | | | Change-Id: I85870f176510d1d6fd51bce94daf58fc326e13b3 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Handle flick state on gesture enabling/disablingPaolo Angelelli2017-03-131-2/+11
| | | | | Change-Id: I178c3ff8d93ce672b0d7e168acbf691c4ddd80de Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Fix MapQuickItem when zoomLevel is setPaolo Angelelli2017-03-082-5/+48
| | | | | | | | | This patch fixes the behavior of MapQuickItem when the zoomLevel is set, that is it makes behave the qquickitem as if it would be on the map, instead of on the screen. Change-Id: Ibb8a6000e2f6a37a68c32df001fc8565079a6f70 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix for map shaking during rotation gesture in presence of tiltingPaolo Angelelli2017-03-071-6/+6
| | | | | | | | This fix makes the reanchoring happen last, preventing the shaking effect when rotating off center on a tilted map Change-Id: I139a7839663ad04a9966f18821308957de562c9e Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Add mapReady to notify when the map is readyThiago Marcos P. Santos2017-03-062-8/+20
| | | | | | | | | This adds a mean to notify when the Map becomes truly ready. This property should always be used in place of listening on the Component completed() signal. Change-Id: I98db7a4fd1fea6e54f6e6eca7ac50f26f90276f5 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Notify when the map is initializedThiago Marcos P. Santos2017-03-032-0/+9
| | | | | | | | | This patch makes the map notify when the initialization is complete, and thus all the API functioning as expected, like fromCoordinate and toCoordinate. Change-Id: Idaebbcf910f32dd297bd5ebec6dffa166d015b4a Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Fix clang compilation warningsBruno de Oliveira Abinader2017-03-012-3/+1
| | | | | | Change-Id: I972cd8bc307ffce9c8f7a56b76cfc0f025b7ad98 Reviewed-by: Thiago Marcos P. Santos <tmpsantos@gmail.com> Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Remove tiltingSupported and bearingSupported propertiesPaolo Angelelli2017-02-282-33/+0
| | | | | | | | | | As these two properties would be deprecated in 5.10, this patch removes them, implicitly forcing all plugins to support tilting and bearing (or at least bearing, as tilting can be bounded via range). Task-number: QTBUG-58931 Change-Id: Iddec8cc225aaa656e8d509bd41b860f18956788a Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Make min/max Tilt/FieldOfView Read/WritePaolo Angelelli2017-02-282-54/+191
| | | | | | | | | | | | This change makes the currently read only properties minimumTilt, maximumTilt, minimumFieldOfView and maximumFieldOfView user-settable as well, like minimum and maximum zoom level. Autotests are included. Task-number: QTBUG-58931 Change-Id: I784be7bd0d960061e94bc40cd8a45e466754526f Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Make QGeoCameraCapabilities independent of the enginePaolo Angelelli2017-02-282-74/+123
| | | | | | | | | | | | | | This patch makes it possible to change QGeoCameraCapabilites at runtime, when the map type changes, to accommodate for those plugins that offer different maps having different capabilities. This is then used to properly push the min/max zoom levels for each map type in our OSM plugin. Autotests are included. Change-Id: I48532da77ffb3eaf2e752561395945c3a2c21985 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Use qRadiansToDegrees() and qDegreesToRadians() more widelyEdward Welbourne2017-02-271-6/+1
| | | | | | | | | | | | | | They document intent more clearly (and replace *two* local hand-rolled versions of each). Also kill an extraneous #include of <math.h>; and switch to qmath.h as source for M_PI, replacing the M_PID value (and friends) previously provided by (thankfully private) qlocationutils_p.h (at more precision than even long double would retain - qmath.h's M_PI is entirely sufficient even for long double, as is the Linux <math.h> one). Task-number: QTBUG-58083 Change-Id: I6fa4abd3c8ed9c826998f2cdc2aefc51681c19c1 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Fix support for MapParameters on Mapbox GL pluginThiago Marcos P. Santos2017-02-172-4/+4
| | | | | | | | | | Mapbox GL plugin can now accept MapParameters, such as MapParameters used for the Mapbox runtime style API, allowing runtime changes on the map, not restricted only to style, but also adding new geometries and features. Change-Id: If0394bd044a2d3058fe5480966880a1055614ea2 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Remove moc_* inclusions from source filesPaolo Angelelli2017-02-1413-26/+0
| | | | | | Change-Id: I7385348d7b6ec22fa92ed1be65f89e262c38b5c0 Reviewed-by: Michal Klocek <michal.klocek@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Support for Mapbox GL Native rendering of QML Map{Polygon,Polyline} itemsBruno de Oliveira Abinader2017-02-143-3/+3
| | | | | | | | | | | | Replaces Mapbox GL Native annotations with runtime styles API. Missing: - Map{Polygon,Rectangle} border width property - see QTBUG-58872 for details. - MapCircle support - see QTBUG-58869 for detais. Change-Id: I77c9daee813a63efc60104f94f440f00ac3cf70f Reviewed-by: Thiago Marcos P. Santos <tmpsantos@gmail.com> Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Remove dirty geo* flags from map itemsv5.9.0-alpha1Paolo Angelelli2017-02-137-77/+1
| | | | | | | | | | | The recommended way for a plugin to get notification for when to update items is to connect to the item's signals. Therefore these introduced dirty flags that would have to be checked in a loop can be removed. Change-Id: I28c9b236b3a2e6296a89649b604381a2001a0b20 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Default style for the copyright defined on the pluginThiago Marcos P. Santos2017-02-133-25/+43
| | | | | | | | | | | | The Mapbox GL plugin defines a logo image on the copyright notice that needs styling in order to have an appealing look and feel. The default style is empty, so we need to fetch one for the plugin to make this work. Task-number: QTBUG-58601 Change-Id: Ib3f7d7d7fcb2797c6381fc862ce7513b516c9ff5 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* QDeclarativeGeoRouteModel: Add missing tr()Friedemann Kleint2017-02-131-1/+1
| | | | | | | Fix warning about constructing a QString from const char *. Change-Id: Ic5d4322fb8beec9645072bbc029ddff5e646eb90 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Use cameraCapabilities from QGeoMapPaolo Angelelli2017-02-101-4/+4
| | | | | | | | | This patch makes the access to cameraCapabilities consistent throughout qdeclarativegeomap.cpp, whereas previously this was sometimes accessed through the mappingManager. Change-Id: I6948f4c376530162a872798b5df848c48237c4c6 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Remove unused qgeocameracapabilities includes from map itemsPaolo Angelelli2017-02-105-5/+0
| | | | | Change-Id: I79915a496984253b2c84334aabeb99acd5bd603d Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix documentation for QDeclarativeGeoMapCopyrightsNoticePaolo Angelelli2017-02-011-1/+1
| | | | | | | This patch fixes the documented mapSource property type Change-Id: I86aa05174ac500b2f8896bc5a3e610b8fe6b2a3d Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Add QDeclarativeGeoMap::fitViewportToVisibleMapItemsPaolo Angelelli2017-01-312-7/+23
| | | | | | | | | | As per request, this additional method behaves like fitViewportToMapItems except that only items that are visible are considered Task-number: QTBUG-57912 Change-Id: Ic334ad0a5a2899b2990a03d4ba655d03c39c1227 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Add support for native polylines in Mapbox GL pluginBruno de Oliveira Abinader2017-01-311-1/+1
| | | | | Change-Id: I14240e095bb6260d56925c026cf78fc1a3ceacdb Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Add color and style properties to QDeclarativeGeoMapCopyrightNoticePaolo Angelelli2017-01-312-25/+103
| | | | | | | | | | | | | | This patch adds two new properties to the MapCopyrightNotice element to allow changing the background color and content style of the notice. backgroundColor controls the color of the background of the element. styleSheet, on the other hand, sets a stylesheet to the html, which allows to change color, font and size of the html. To make this work, the html output from the plugins has to be properly enclosed in <body></body> tags. Change-Id: I776f78f4b26b5b2cf04510a9fbc6302334b09c61 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Add mapItemOpacity signal to QDeclarativeGeoMapItemBasePaolo Angelelli2017-01-312-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | Map items are different from regular QQuickItems in that they could be rendered externally of the qtquick scene graph renderer. With the introduction of MapItemGroups, the opacity of map items can be changed not only by setting the opacity property of an item, but also by changing the opacity property of a MapItemGroup, which would affect the opacity of all the items contained inside. When these items are handed over to a plugin for rendering, it becomes therefore impossible to know when the opacity of the group changes. The new signal mapItemOpacity serves the purpose of communicating whether either the opacity property of an item, or the opacity property of its MapItemGroup parent (if the item happens to be inside a group) changes. The associated mapItemOpacity is then in charge of returning the correct combined opacity of the item. Change-Id: I0ecbd1fc4c220291209e649bb44848854760f682 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Allow to create maps with groups of map itemsPaolo Angelelli2017-01-315-10/+330
| | | | | | | | | | | | | This patch lets a user create an external qml file, and put multiple map items inside a parent MapItemGroup{}, and add that element to a Map item. QDeclarativeGeoMap gets also two associated methods: addMapItemGroup and removeMapItemGroup to deal with item groups at runtime. Additionally, clearMapItems now clears also added item groups. Task-number: QTBUG-55211 Change-Id: Ie4e602e4bda65fb56422b721be5fd34c54eb7954 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Add tilt and bearing gestures to QQuickGeoMapGestureAreaPaolo Angelelli2017-01-303-62/+613
| | | | | | | | | | | | | | | | | | | This patch adds two new gestures to the Map gesture area, that are two finger rotation and two finger parallel vertical sliding. The first gesture changes the bearing of the map, while the second gesture changes the tilt angle. The rotation gesture can co-exist with both pan and pinch. In other words it's possible to put down two fingers on the map, and rotate, pinch and pan at the same time. The tilt gesture, on the other hand, excludes the others when initiated, and also does not start, if any of the other actions is in progress. Change-Id: I0ef003caf0efe4addcf2e5ad563212f3c53db9ba Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Clean up dead code and TODO commentsPaolo Angelelli2017-01-304-95/+2
| | | | | | | | This patch cleans up dead or disabled code and TODO comments added with change c57d42b47004623db9b934d0688180ec6dc1a73e Change-Id: I2817f20c8eb56386f8dbee2c661e3034f48caa30 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Add disclaimer to all private classes in the location modulePaolo Angelelli2017-01-301-0/+11
| | | | | | | | This patch adds the warning disclaimer on a few classes in the location module that still missed it. Change-Id: Idef6cb32b6b628dc82aaaff2630b6b7d7281b774 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix MapParameter documentationPaolo Angelelli2017-01-301-1/+1
| | | | | | | Fix for the property type of the property "type", that is a string. Change-Id: Ieac9cdcf28cab539a602f39491f58c51d126c593 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Expose QDeclarativeGeoMapCopyrightNotice in QMLPaolo Angelelli2017-01-304-7/+107
| | | | | | | | | | | | | | | | | | | | | This change allows the user to create a separate MapCopyrightsNotice, and source the notice from a Map element. The purpose is to allow the user to stack multiple Map elements and have a cleanly arranged set of copyright notices on top of this stack. To do so it is now possible to setCopyrightsVisible(false) on all the Map elements, then declare one notice per map, and arrange it appropriately on top of the stack. As for any other QQuickItem, a MapCopyrightsNotice cannot be declared inside a Map {} element, and if done so, a a warning will be produced. Change-Id: Ie38dec40cf25f0c44d1da39fd74469944eb79eba Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Allow QGeoMap to render map itemsPaolo Angelelli2017-01-3014-14/+137
| | | | | | | | | | | | | | | | | Currently QtLocation Map items are always rendered by QtLocation, on top of what QGeoMap generates. This patch introduces a new private api call to QGeoMap, supportedMapItemTypes(), that is used to inform QtLocation to not render map items of those types, but rather pass them over to the QGeoMap, which will take care of the rendering. In this way, more advanced renderers can properly render map items, for example below labels or 3D buildings. Change-Id: I1c82d4f11d4dd44c3011926512520d62e26295d4 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Adapt QQuickGeoMapGestureArea to work with tilted and rotated mapsPaolo Angelelli2017-01-261-38/+36
| | | | | | | | This patch fixes the handling of pan/flick/pinch in presence of tilt or bearing. Change-Id: Iad04fd92e1c8e318e3b1b0d344852c81e554ebb7 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Moving location qml implementation to location/declarative*Paolo Angelelli2017-01-2648-0/+15134
QtLocation quick classes and headers are moved out of the import directory. The location quick classes are now in a subdirectory inside the main qtlocation module. This is necessary in order to privately export certain classes, such as Map Items classes, and create an API to inject these objects into QGeoMap to let plugins render the Map Items directly Change-Id: Ia6ba5f07c4eddd3c4c2ce54bf34f1afcd42c2558 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>