summaryrefslogtreecommitdiff
path: root/src/location/maps/qgeomap.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix performance issue with copyright noticePaolo Angelelli2018-01-151-0/+19
| | | | | | | | | | | | 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>
* Replace QGeoMapType argument of cameraCapabilitiesPaolo Angelelli2017-04-121-2/+2
| | | | | | | | | | Since the only part of QGeoMapType used in the method is mapId, there's no need to pass the whole map type as argument. The benefit is that the camera caps can be requested solely based on the info in QGeoTileSpec. Change-Id: Iafd0e2a1d4d45fbf02b862efe56841001cbebd75 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Make QGeoCameraCapabilities independent of the enginePaolo Angelelli2017-02-281-4/+26
| | | | | | | | | | | | | | 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/+2
| | | | | Change-Id: I29988fb460881e3944e5aab9a2f4d0b542a578ef Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Fix support for MapParameters on Mapbox GL pluginThiago Marcos P. Santos2017-02-171-2/+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>
* Default style for the copyright defined on the pluginThiago Marcos P. Santos2017-02-131-0/+5
| | | | | | | | | | | | 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>
* Allow QGeoMap to render map itemsPaolo Angelelli2017-01-301-0/+49
| | | | | | | | | | | | | | | | | 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>
* Add rotation and tilt controls to QDeclarativeGeoMapPaolo Angelelli2017-01-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-161-31/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Refactor QGeoMap API: split coordinate <-> itemPosition callsPaolo Angelelli2016-12-071-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch splits the two calls coordinateToItemPosition and itemPositionToCoordinate into 3 separate steps: - coordinate to map projection. Map projection has always to be in [0,1] [0,1] range. In case of QGeoTiledMap, the only map projection supported is WebMercator, thus this call is currently equivalent to coordinateToMercator. - wrap map projection. Due to the longitude-wrapping-around nature of QGeoMap/QDeclarativeGeoMap, coordinates which are greater than others might end up before the others on the X axis of the projection. This stage takes care of this aspect - finally wrapped map projection to item position. this maps a wrapped coordinate to screen. Equivalent calls to do the inverse conversion are also provided. The benefits of splitting the conversion in 3 are: - possibility to precompute the map projection of item coordinates, thus having to simply re-wrap them (2 ifs and one sum) upon camera change. - Possibility to bake the last step into a 4x4 matrix and offload this to GPU - support for rotation and tilting cameras. Without, it would be impossible to "unwrapBelowX" item coordinates in presence of rotation and tilt, while now it would be possible to do this before the final projection to screen that peforms the tilting/rotation. Change-Id: I9b6a06ff051bbfd09e6d3584485acdcebdceb7bd Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Merge remote-tracking branch 'gerrit/5.8' into devAlex Blasche2016-12-051-10/+10
|\ | | | | | | | | | | | | | | | | | | | | 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-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | MapParameters for accessing specific features of custom QGeoMapsPaolo Angelelli2016-12-011-0/+36
|/ | | | | | | | | | | | | | | | | | | | | | 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>
* Reduce setCameraData calls to minimumMichal Klocek2016-03-171-47/+17
| | | | | | | | | | | 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-41/+1
| | | | | | | | | | | | | | | | | | | | | | | 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-1/+8
| | | | | | | | | | | | | | | | | | 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>
* Emit activeMapTypeChanged in QGeoMap as wellJoni Poikelin2015-12-161-0/+1
| | | | | Change-Id: I98bdcfbb57d3d597e23ecaf3bb862daa5a917f00 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Add clearData() call to map qml apiMichal Klocek2015-12-071-0/+5
| | | | | | | | | | | Add clearData call to clear texture, memory and disk cache. Update mapviewer example and add "prefetchData" and "clearData" to Tools menu. Task-number: QTBUG-47292 Change-Id: Ifc71a3652688d1403f5b011ef231b59381c17ee3 Reviewed-by: Harald Meyer <dev@meh.at> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Fix tile version handlingMichal Klocek2015-06-041-14/+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-9/+5
| | | | | | | | | | | | | | | | 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>
* Remove movementStopped from QDeclarativeGeoMapGestureAreaMichal Klocek2015-05-051-0/+5
| | | | | Change-Id: I8d8265dd51838bc61c3ea86c487cf5e6ff60a475 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Fixes PIMPL in QGeoTiledMap.Michal Klocek2015-05-051-7/+12
| | | | | | | | | | | | | | 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-78/+31
| | | | | | | | 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-41/+161
| | | | | | | | | 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>
* Cleanup QGeoMap code.v5.5.0-beta1Michal Klocek2015-04-301-45/+24
| | | | | | | | | | This commit: * renames class members to use m_ naming convention * removes not required includes * removes not required forward declarations Change-Id: If1132ecf0413022ecfe4e781cb412bf8f8d6740e Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Remove LGPLv2.1 and add GPLv2+ from/to QtLocationAlex Blasche2015-02-191-14/+17
| | | | | | Change-Id: I3007aa04d3dbc0e00cb0a43987d64d01ddf91edd Reviewed-by: Lorn Potter <lorn.potter@gmail.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* Update contact URL in all license headers to qt.ioAlex Blasche2015-02-181-1/+1
| | | | | Change-Id: Ia1e333be7fec8898de609d9b9303b1ad7687632e Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* Allow HTML based copyright notices.Aaron McCarthy2015-01-271-1/+2
| | | | | | | | | | | | | | | | In addition to the image based map copyright/attribution notice allow a geo service provider to provide a HTML string which is rendered and displayed. Add copyrightLinkActivated signal to the map to enable the application to launch the url in an external browser. The geo service providers are no longer in control of the position of the copyright notice. For the time being it will be placed at the bottom left of the map. Change-Id: I49bfc58a70e9254220903d5103c714c08f327e8b Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Better names for incorrectly named Map functions.Aaron McCarthy2015-01-201-4/+4
| | | | | | | | | | | | | | | | | | | The functions to transform between coordinates and position on screen were incorrect. Documentation and function names did not match implementation. New functions with better names have been added and documentation updated to match implementation. Old invalid functions have been deprecated. Related private symbols have been renamed to match their purpose. [ChangeLog][QtLocation][Important Behavior Changes] Functions in Map item which are used transform between coordinates and screen position have been deprecated due to confusing naming. Change-Id: Ic501cd81220414800bc2247eae9f510954ee469f Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Update license headers and add new license filesAntti Kokko2014-08-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: Iedee2507ab1bd46788409a98505d7be510253110 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Replace Qt3D with scene graph API for map rendering.Gunnar Sletta2014-03-241-15/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QtLocation now links against QtQuick and the QGeoMap has a updateSceneGraph(QSGNode *, QQuickWindow *) function to populate the scene graph with map content in what ever style the implementation decides. The only implementation right now is the QGeoTileMapData (same as with the Qt3D code). Camera positioning, zooming, panning, etc has been preserved in the interest of minimzing the change and keeping things "as they were". All rendering logic is moved into the updateSceneGraph function, where we find the delta between what is shown in the scene graph and what the scene things should be visible. Nodes are added removed accordingly. This logic is isolated from the rest of the code as it primarily lives in the scene graph render thread and may be released at an arbitrary time. Doing this every frame might seem daunting, but for the most, it is a couple of checks on a few tens of nodes, compared to rendering millions of pixels afterwards, so this is not going to be a bottleneck. Texture uploads are now done in the scene graph's rendering phase, so the map item's sync is fast. This means the map element doesn't block both GUI and render threads for extended time periods. In contrast, the Qt3D code path uploaded tiles and rendered them to an FBO in the sync phase, resulting in very poor parallelization. We cache the textures designated as visible and nothing else. Primarily in the interest of simplicity, but also because uploading 256x256 textures is a no-brainer on modern GPU's, including lower-end mobile and embedded. The QGeoTileTexture sits on a QImage instead of an actual texture to keep a strict separation between render thread and GUI thread clean. Texture cleanup is done by the scene graph structure. The Qt3D codepath rendered to an FBO, so it was implicitly clipped to its bounds. To preserve this behavior, the scene graph implementation does the same. Not doing so looks a bit odd, at least when zooming all the way out so the world is significantly smaller than the viewport. The scene graph code also adds a rectangle of solid 0.9 gray to match the default color of the old FBO code. Change-Id: Ia736cea6e3616721c2de6beb5d72e570adcb21e6 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Normalize signal & slot signatures in connectionThiago Macieira2014-02-281-2/+2
| | | | | | | | Profiling shows Qt Creator spends 2% of its load time normalizing Change-Id: Ica52c45e34fe53823b31faaa7d77a633458549d5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Always use double point precision for geo lookups internallyErik Mattsson2013-11-061-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | This patch is to remedy rounding errors on ARM devices where qreal is defined as a float instead of double. The main change is to replace QPointF with QDoubleVector2D when using screenPositionToCoordinate and coordinateToScreenPosition. In many cases the QDoubleVector2D is converted to QPointF when the increased precision is not used. This because many of the surounding classes uses qreal so the precsision would be lost anyway. These classes include QVectorPath, QPainterPath and QQuickItem. The most important change is in polyline and polygon map item in the updateSourcePoints methods. Using floating point precision here resulted in many precision errors that caused for example route lines to be chopped of as the method erroneously thought it needed to wrap to the other side of the datum line. The external uses of the coordinate lookup functions in declarative geo map has been left untouched so they still use QPointF for compatibility reasons. Not sure how the process goes when updating externally visible parts of the API Change-Id: I01ed67a0563cfb5c4ff2db6395b7a62eaa8e4a19 Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
* Make geo coordinates animatable in QML.Albin Olsson2013-10-111-3/+5
| | | | | | | | | | | | | | | | | | | | Interpolation logic in AnimatableCoordinate has been moved around so that QGeoCoordinates can be animated directly by QPropertyAnimation. A new QML type has been added, 'CoordinateAnimation', for animating coordinates in QML. This type follows the pattern of 'ColorAnimation' and other specializations of 'PropertyAnimation'. QDoubleVector2D, QDoubleVector3D and QGeoProjection has been moved to QtPositioning Testcase for CoordinateAnimation has been added to declarative_ui. AnimatableCoordinate and QGeoCoordinateInterpolator are redundant and have been removed. Change-Id: I0809da566e1800274384f9c5337df65623d1e61a Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Update copyright year to 2013Sergio Ahumada2013-06-131-1/+1
| | | | | Change-Id: I5b0cb7d56997ad7b91c073b3e02b31d0368fdcfa Reviewed-by: Alex <alexander.blasche@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-241-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ic1390da64a219642fa1e1482a7677a4c2db15cbc Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Remove Maps from public C++ API.Aaron McCarthy2012-06-071-2/+2
| | | | | | | | | | | | The preliminary C++ Maps API was exposed to provide an interface between the QML plugin and the geo services plugins. Mark it as private API for now as it is likely to change when the full C++ API is developed. Mapping functionality is currently only available through QML. Change-Id: Id16e0f1a2165c70192047dffa40e69ab1f29ba69 Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
* Simple prefetch schemeThomas Lowe2012-05-161-0/+5
| | | | | | | | | | | | | | | | | | | | | Prefetches larger set of tiles when camera is stopped QTBUG-25136 Prefetch implementation including zoom-level prefetching Two prefetching options- pan buffer, or pan buffer for two nearest zoom levels Code simplified by removing all three visibleTiles lists, so they can't go out of sync Textures not promoted up the cache if they aren't visible when retrieved from server Also: Prefetch on map initialize + optimisation This ensures that the prefetch is called at the end of initialisation Useful if the location is not already in disk cache. And makes no difference if it is already in disk cache. QTBUG-25786 Change-Id: Ife7c1d103f83695659f4534880268fa5afd8f7c7 Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
* Coding style fixes: whitespace around pointers/referencesAlex Wilson2012-05-151-2/+2
| | | | | | Change-Id: Ie527591e2d9a1578137136fb6664e86c43eed1bf Reviewed-by: Thomas Lowe <thomas.lowe@nokia.com> Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
* Files renamed and cache only accessed through engineThomas Lowe2012-05-091-2/+2
| | | | | | | | | | | | | | | | | This isn't completely what was requested on the ticket, but it makes the cache more separate, so easier to pull in/out. Mainly this is a slight reworking of the caching to make it a bit simpler for future prefetching. In particular: mapGeometry renamed to mapScene mapImages renames to tileRequestManager and mapImages::setVisible is now tileRequestManager::requestTiles The data flow has been simplified so the requestManager speaks directly to the tiledMappingManagerEngine and this engine takes care of inspecting the single cache. Task-number: QTBUG-25560 Change-Id: I31b2e26c45f7a7ac56fe138cf1a8906a228a93d3 Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
* Implementation of copyrights notice handling mechanism in tiled maps.bhashish2012-03-161-0/+1
| | | | | | | | | | | | | | | | | | | The implementation is split into two parts: 1) Implementing the mechanism: - Introducing QGeoCopyrights class in imports qml declarative module - Implementation of copyrights-change notification mechanism for tiled map operation. - Implementation of a trivial Nokia Plugin copyrights notice which renders only Nokia logo. 2) Implementation of Nokia Plugin specific copyrights fetching and passing through above established mechanism. This commit contains first part only. Next part to be implemented shortly in following commit. Change-Id: I2b3d85c058e6c6502d174215e37640dfff898261 Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
* Changed how the scene is rendered in regards of the FBOCristian Adam2012-03-141-3/+3
| | | | | | | | | | | | | | Removed vertical flip for the geometry and vertically flipped the FBO texture, having in result the same map. The difference is the paintGL method call for the plugin which now works with top left scene and not bottom left as it used to work because of the FBO Change-Id: Ia456d8557eb499f1be0f09783d465914eb05b7ab Reviewed-by: Michal Klocek <michal.klocek@digia.com> Reviewed-by: Sarah Jane Smith <sarah.j.smith@nokia.com> Reviewed-by: David Laing <david.laing@nokia.com>
* Refactoring of QtLocation APIBasel Hashisho2012-03-091-284/+32
| | | | | | | | | | | | | | | | | | | | | 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-7/+8
| | | | | | | | | | | | | 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/+14
| | | | | | | | | | | 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 QGeoCameraData class.David Laing2012-02-161-5/+4
| | | | | | | | | | | | There were some fields that were unused or only used for debugging the prototype of the library which are no longer needed. This removes those fields and renames zoomFactor to zoomLevel - "zoomLevel" is a better name for it, but we need the double type / semantics of zoomFactor. Change-Id: I32ba97ca1b4bccfe33b86c8eccd2c94b12079d2e Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
* Adds the camera capabilities class.David Laing2012-02-161-1/+27
| | | | | | | | This class unifies access to the data related to what the valid range of camera parameters are for a given map plugin. Change-Id: I681eba4a8e1c1cbd34995ed1e97064ab194b1e40 Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
* Corrects for some uninitialized variable usage.David Laing2012-02-071-1/+4
| | | | | | | Thanks to valgrind for the warnings. Change-Id: Id1ca2b3560f2f1e470844454be0d0e9f7729db2b Reviewed-by: Alex <alex.blasche@nokia.com>
* Cleans up the projection code.David Laing2012-02-021-32/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-349/+60
| | | | | | | | | | | 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>