summaryrefslogtreecommitdiff
path: root/src/location/maps/qgeomap_p_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix performance issue with copyright noticePaolo Angelelli2018-01-151-0/+4
| | | | | | | | | | | | Skip evaluating copyrights when the notice is not visible. The implication of this patch is that copyright information won't be up to date or even available unless there is an "attached" copyright notice that has the visible property set to true. Task-number: QTBUG-64880 Change-Id: I3750b61913becb0cbf31273ad9a76ae1a2b6a393 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Make QGeoCameraCapabilities independent of the enginePaolo Angelelli2017-02-281-0/+5
| | | | | | | | | | | | | | 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 an ordered container for storing map itemsBruno de Oliveira Abinader2017-02-241-2/+1
| | | | | Change-Id: I29988fb460881e3944e5aab9a2f4d0b542a578ef Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Fix support for MapParameters on Mapbox GL pluginThiago Marcos P. Santos2017-02-171-1/+2
| | | | | | | | | | 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>
* Allow QGeoMap to render map itemsPaolo Angelelli2017-01-301-0/+7
| | | | | | | | | | | | | | | | | 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>
* Move the coordinate <-> item position conversion to QGeoProjectionPaolo Angelelli2017-01-161-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Merge remote-tracking branch 'gerrit/5.8' into devAlex Blasche2016-12-051-4/+6
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/location/qdeclarativegeomap.cpp src/location/maps/maps.pri src/location/maps/qgeomap_p_p.h src/plugins/geoservices/nokia/qgeocodereply_nokia.cpp src/plugins/geoservices/osm/qgeoroutereplyosm.cpp Change-Id: I18d31cff9233648178fe3e2636ce294026dfaeb7
| * Renaming QGeoMapPrivate::changeMapSize to changeViewportSizePaolo Angelelli2016-11-221-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current name of this method generate confusion, as what it does is changing the size of the final element in the application, and not the actual map size. This patch renames this method to changeDisplaySize It also renames QGeoMap::setSize to setViewportSize, as well as ::size to viewportSize , width to viewportWidth and height to viewportHeight, to make everything consistent and self-explanatory. Finally it also renames minimumZoomAtMapSize to minimumZoomAtViewportSize. Change-Id: I7c1ca8bb3ca3d6f6b0fe6fc881b9300db7110527 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * Add Q_LOCATION_PRIVATE_EXPORT to QGeoMapPrivatePaolo Angelelli2016-11-221-3/+4
| | | | | | | | | | | | | | | | This patch privately exports QGeoMapPrivate, effectively making it possible to subclass QGeoMap directly. Change-Id: Ib373eff5ab6782c832464d2df3484d2790ea3644 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | MapParameters for accessing specific features of custom QGeoMapsPaolo Angelelli2016-12-011-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a new MapParameter object to give users access to specific features of a custom QGeoMap otherwise not accessible through the standard API. A MapParameter is implemented by a QDeclarativeGeoMapParameter, which, in turns, inherits from QGeoMapParameter in the location module. In this way QGeoMap & subclasses won't depend on declarative, from this side, still allowing a QMapWidget someday. The implementation is based, on both sides, on the dynamic properties of QObjects for defining the MapProperty data. This allows high flexibility in defining various types of MapParameters (essentially by duck typing them), and therefore each plugin which makes use of them must document each of them. Change-Id: I5f3a8c18e996f290beb8e4ff37d3c2c655eefc6c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Fix includes in qgeomap_p_pPaolo Angelelli2016-11-191-3/+3
| | | | | | | | | | | | | | This patch fixes includes which would fail if imported in a plugin Change-Id: I989ac19abe8b686aae1c3b7353ea01d3ed2b9e17 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | QGeoMap/QGeoTiledMap refactoringPaolo Angelelli2016-11-181-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch does a small refactoring of these classes, removing unused variables and privately exporting QGeoMap/QGeoTiledMap private classes. This is necessary in order to subclass QGeoMap inside a plugin, due to the protected QGeoMap constructor that takes a QGeoMapPrivate reference. If, at a later point, this pattern will be changed, it might also become possible to move the pure virtual methods away from QGeoMapPrivate, and allow QGeoMap subclassing without having access to QGeoMapPrivate. Change-Id: I4178695d4bf1201b0525e20979c440357edab14a Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* | Refactor QGeoMapPrivate::changeCameraData()Paolo Angelelli2016-10-191-1/+1
|/ | | | | | | | | changeCameraData does not currently send oldCameraData (which is anyway not used) Renaming the parameter to "cameraData" Change-Id: I410dae0ff8fe63fb338c445f5358840add234f29 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Reduce setCameraData calls to minimumMichal Klocek2016-03-171-7/+3
| | | | | | | | | | | Remove checks for cameraCapabilities during each setCameraData call. This checks are already performed on plugin initialization. Refactor QGeoMapPrivate to reduce resize calls. Rename updateRequired to sgNodeChanged to reflect real useage. Add setter setSize for QGeoMap. Change-Id: If4e3501fa99a8a97cbc471990837b08c43b8e723 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Remove QGeoMapController from QGeoMapMichal Klocek2016-03-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | | Refactor code to use QGeoCameraData directly. All functionality related to zoom, center boundary checks are now handled in QDeclaratvieGeoMap class. This makes handling of center and zoomLevel properties much simpler and less error prone, since camera data can not be modified along the call stack. As result we avoid forwarding change signals back and forth: * qgeodeclarativegeomap::setCenter -> qgeomapcontroller::setCenter * qgeomapcontroller::setCenter -> qgeomap::setCameraData * qgeomap::setCameraData -> qgeomacontroller::cameraDataChanged * qgeomapcontroller::cameraDataChanged -> emit qdecalartivegeomap::centerChanged Call always setCenter and setZoomLevel on qdeclarativegeomap instance instead. Introduce initialize() method to handle cases where map plugin is loaded and scenegraph geometery is not yet set. This is required to correctly handle new boundary checks to limit grey areas. Change-Id: I6066cefd4a648dc76333dc241d1f261451a32e9c Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Adjustment for the minimum zoom level to prevent gray bandsPaolo Angelelli2016-03-021-0/+1
| | | | | | | | | | | | | | | | | | This patch introduces a lower bound for the minimum zoom level of a map element so that it becomes canvas size dependent, and it will also prevent the map from being smaller than the canvas size in either dimension, avoiding gray bands. It also bounds the center of the map so that the map cannot be panned or flicked out of bounds. The documentation for QDeclarativeGeoMap::minimumZoomLevel has been modified to reflect the new behavior. A few testcases have been modified to reflect this new behavior and its implications. Change-Id: I3c8160d0295e8dda2f7001e8fec68a5200ea2172 Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com>
* Fix tile version handlingMichal Klocek2015-06-041-1/+0
| | | | | | | | | | Here maps plugin checks server for tile version. When tile version is updated, update not only the current camera tiles, but also scene tiles. Task-number: QTBUG-44809 Change-Id: Iedb3add5308a2e61cc18e169e33ea4510e1a4fee Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Fix missing guarded pointers for mapping engineMichal Klocek2015-05-211-1/+1
| | | | | | | | | | | | | | | | Since mapping engine is going to be destroyed on geoseriveprovider change/plugin unload use QPointer to track engine existence before making calls. This commit refactors a bit QGeoTileRequestManager to handle all the calls to the enigne. Check for null pointer before calling the engine. Move registerMap method to base class. Update QGeoTiledMapNokia class accordingly. Change-Id: I886e85e660b2c515e4a617e98e9cc0c3c13781b6 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Fixes PIMPL in QGeoTiledMap.Michal Klocek2015-05-051-0/+6
| | | | | | | | | | | | | | This commit makes following changes: * QGeoTiledMapPrivate is now a subclass of QGeoMapPrivate. * makes QGeoMap constructor private. * change visibility of setCameraData in QGeoMap, so that only QGeoMapController can modify the camera data. * moves mapResized,changeCameraData,changeActiveMapType to private implementation interface. * moves mapVersion member function to base class. Change-Id: I336e7f72b03e845e09e445a6eebad90b2e46dbd1 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Fix PIMPL in QGeoMap.Michal Klocek2015-05-041-20/+6
| | | | | | | | Use QObjectPrivate as base for QGeoMapPrivate. Remove not required setters and getters in private class. Change-Id: I029a77907235b4b0976ad961f1c41b5038da3881 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Remove QGeoMapData class.Michal Klocek2015-05-041-0/+97
| | | | | | | | | Since QGeoMap class does not have any subclasses, there is no need for keeping the bridge in form of QGeoMapData. This commit basically renames QGeoMapData to be QGeoMap. Change-Id: I6eb2f56f7ea83663034f4a8297e8e8f7f185d6a9 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Refactoring of QtLocation APIBasel Hashisho2012-03-091-145/+0
| | | | | | | | | | | | | | | | | | | | | Refactoring QGeoMap, QGeoMappingManager, QGeoMappingManagerEngine Introducing QGeoMapData, QGeoTiledMap, QGeoTiledMappingManagerEngine, QGeoTileFetcher QGeoMap: Container for QGeoMapData QGeoMapData: No tiles data/functionality QGeoTiledMapData: Implements tiles data/functionality. QGeoMappingManager: Looses tiles-related data/functionality. QGeoMappingManagerEngine => QGeoMappingManagerEngine (no tiles data/functionality) QGeoTiledMappingManagerEngine (implements tiles-related data/functionality). QGeoTileFetcher: Implements tile fetching functionality from tiles provider. This commit compiles and runs through mapviewer example. Tests also were adjusted to fit refactored architecture. Change-Id: Id2b62d62d5cd4aaca8295c67e44c009cde636462 Reviewed-by: Alex <alex.blasche@nokia.com>
* Implementing deregisterMap to avoid crashes on slow requestsAlex Wilson2012-03-091-1/+2
| | | | | | | | | | | | | Previously, high-latency requests that were still running could complete after deregisterMap() was called, and a pointer to the old QGeoMap would still be present in the array -- which triggered a segfault. Now we make sure to remove all references to a disappearing map. This patch also handles a common destructor race causing similar segfaults at exit (and in autotests) Change-Id: I936d6c0d556d79fc43aa238b0b1d3dc63e5db11e Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
* Expose camera caps via QGeoMap, add isValid() method to camera capsAlex Wilson2012-02-241-0/+1
| | | | | | | | | | | This is useful to the QML plugin, so that map objects can be aware of what camera actions to expect from their parent map. The isValid() method is necessary so that callers can tell the difference between a default, empty QGeoCameraCapabilities, and one actually populated by a backend plugin. Change-Id: I7e742fee5bac9f003e0cc99e4c3d6a747a67ea24 Reviewed-by: David Laing <david.laing@nokia.com>
* Cleans up the projection code.David Laing2012-02-021-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There was no longer any point in providing the screen <-> 3d scene position functions, which meant that the projection class was just doing coordinate <-> mercator conversions and intepolating coordinates. The interpolation code was moved out and the mercator conversions were made static. We have future changes coming which will allow people who want different projections to provide them, so it's not to big a deal to specialize the class towards the mercator projection. There were some other small changes made which make the map actually pay attention to the size of the tiles and the maximum zoom level as per the plugin. Actually enforcing the tilt / bearing / zoom parameters will appear in a separate commit before very long. Change-Id: I31dc39165bde123fbe8e3e2e70e401c5d73932b3 Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
* Geometry changes for precision issues.David Laing2012-02-021-20/+4
| | | | | | | | | | | This also removes / cleans up a few classes that are made partially redundant by this change. Change-Id: Ib8118cc3e3df3ecd024a11184ff2523af43d7b03 Task-number: QTBUG-23413 Task-number: QTBUG-23501 Task-number: QTBUG-23166 Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I00c66363046e475e6924aafd221483c7fad5c0d9 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I3850177e14291901e924f9c27ba09e75df00f96a Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Refactoring ahead of precision issue fixes.David Laing2012-01-171-94/+9
| | | | | | | | | | | | | | | | | | | | | We need to rework the GL geometry and camera positioning code to avoid problems with arising from the single precision floats that GL uses. This change is the first step down this path, which adds double precision versions of the QVector2/3D classes and changes the maps code to use them. It also adds a new class which determines which tiles will be visible based on the relevant bits of information from the map (now using double precision). This was done to force the decoupling of the code which determines the visible tiles from the details of the GL geometry / camera / etc... Change-Id: I7127e39097a92028dfea01d816c14c9b9666569e Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
* Adding private API warnings for the Maps API.David Laing2012-01-091-0/+254
Also renamed some of the files to follow the naming conventions for private header files. Change-Id: I84a6bc0956b942861dfb63169cb4cdcc2033f2df Reviewed-by: Alex Wilson <alex.wilson@nokia.com>