summaryrefslogtreecommitdiff
path: root/tests/auto/qgeotiledmapscene
Commit message (Collapse)AuthorAgeFilesLines
* Add rotation and tilt controls to QDeclarativeGeoMapPaolo Angelelli2017-01-251-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QDeclarativeGeoMap currently does not provide any mean to set bearing and tilt into qgeocameradata. It has been not a problem since QGeoTiledMap and sons did not support it. External renderers however support it, so this patch adds QML api calls to control these parameters, and adapt the existing logic to take them into consideration in camera-related calls, as well as in the afterViewportChange handlers of the Map Items. This patch also sligthly modifies the QML api to make the handling of all the bounded camera property more homogeneous. Minimum and maximum zoom levels prior plugin initialization aren't -1 anymore, but are some valid lower and upper bounds for this property, that is 0 and 30. in this way all the 2 bounded properties (zoomLevel and tilt) behave the same, in that they can be freely set before plugin initialization, within reasonable predefined bounds, and, after that, they may be clamped depending on the actual plugin capabilities. Autotests for the QML part of the API included. Change-Id: I9d09e32698a7330388e465e8ea7523ee39577d34 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Move the coordinate <-> item position conversion to QGeoProjectionPaolo Angelelli2017-01-162-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch simplifies the QGeoMap API removing all the API necessary to convert to and from screen. This is now demanded to a specific QGeoProjection class, that will be independent of the map, except for using the same Geo projection (currently only WebMercator, or EPSG:3857, although we use a sphere instead of an ellipsoid, i believe) The benefits are - This relieves subclasses of QGeoMap from implementing a GeoProjection API, especially since QtLocation currently supports only WebMercator, and reimplementations would have to anyway produce the same results as the inbuilt one. - This avoids the several indirection steps previously necessary to perform a map projection (qgeotiledmap -> private->mapscene-> private). Since these operation are quite frequent one per map item coordinate at every redraw, shortening the indirection chain is beneficial - It simplifies the highly complex QGeoTiledMapScene, separating all the logic that is not needed to draw the scene, but only to perform geo coordinate <-> screen coordinate conversion Change-Id: I9e3ca5280166f2d6430a32deb44c030d02d9d4e1 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Rename QGeoProjection to QWebMercatorPaolo Angelelli2017-01-161-3/+3
| | | | | | | | | | QGeoProjection is currently a class containing only static methods for WebMercator conversion/interpolation. This patch renames it to QWebMercator, effectively freeing the QGeoProjection name for a real projection class Change-Id: I15b71d04f7d1d21a1d26f46687ed33aa277f6deb Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Compile-fix: qAbs is less ambiguous than abs(double)Edward Welbourne2016-12-091-6/+6
| | | | | | | | | Furthermore, since the candidates for abs(), that g++ found, all took integral parameters, they would have involved truncation. Our qAbs() is suitably templated to cope with double naturally. Change-Id: I373a08657ed182c7d853104879b07fb7704cc418 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Refactoring QGeoTiledMapScene::mercatorToItemPositionPaolo Angelelli2016-12-071-76/+71
| | | | | | | | | | | | | | | | | | | This patch reimplements the method mercatorToItemPosition using values relevant for this type of conversion, instead of re-using values initially computed for the tile generation. This allows to greatly optimize the method, reducing branches and the total number of operations, as well as making it easier to understand. This patch also removes the support for letterboxing the map viewport inside the DeclarativeGeoMap, as there now is the constraint that the map can never be smaller than the containing element. Change-Id: Ida98e97ad0a6b65233c80ae3c4abd3ec7664c555 Reviewed-by: Michal Klocek <michal.klocek@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* QGeoMapScene renamed to QGeoTiledMapScenev5.7.0-alpha1Paolo Angelelli2016-03-032-0/+392
Since the class QGeoMapScene is tightly coupled to QGeoTiledMap, this patch renames it into QGeoTiledMapScene/QGeoTiledMapScenePrivate, to clarify the structure of the module and avoid confusion, as otherwise it would not be clear that this class is exclusively used by QGeoTiledMap. Change-Id: Ifd76b02ff14d0f0690dc37fcb0a93b0e0702d05d Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>