| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With this change, all the geo-to-screen conversion,
and the triangulation operations for geo polylines
and geo polygon are performed either at set time
or in the shader.
A separate bounding box geometry is processed
in the old way to provide a correct QtQuick Item
geometry, that can be used for nesting mouse areas,
performing translations, input event delivery, etc.
With this approach, performance are improved by more
than one order of magnitude in average, but complex
geometries will of course benefit more.
It also adds correct rendering support for polygons
with holes, previously only rendered correctly
by the MapboxGL plugin.
The polyline shader has basic miter joins. The miter is
skipped if the angle is too sharp to avoid complicating
the implementation.
This shader introduces some glitches when the polyline
is minified, for which the real fix is to
have LOD for the geometry, and render simplified
geometries at low zoom levels (added in a subsequent patch).
Note: this approach, at least in its current implementation,
does not support enabling layers on individual items, only
on the Map element.
Task-number: QTBUG-49303
Task-number: QTBUG-38459
Change-Id: I0c2dc0bf364d32f74ca7c4014f6d66e6219c8ae4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
This will allow moving the visible map area to a subregion
of the viewport, allowing to maintain the desired visible
region visible when overlaying controls on top of the map.
Task-number: QTBUG-68966
Change-Id: Idf4b30f7c1e4062e5e1c0ddc01a31bc856c0bc0c
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-66880
Change-Id: I14f3d3fa933b63436dcd3034c07a5dad51f18b1f
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/location/declarativemaps/qdeclarativegeomap.cpp
src/location/maps/qgeomap.cpp
src/location/maps/qgeomap_p_p.h
src/location/maps/qgeorouteparserosrmv5.cpp
src/location/maps/qgeotiledmap.cpp
src/positioning/positioning.pro
Change-Id: I42f8b176a8f3e824c7fe5b067a958735173f0dbb
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QtLocation mapping has always been geared around the WebMercator
projection. Some mapping SDKs support additional projections, such
as General Perspective (often called globe view or globe rendering).
The goal of this patch is to allow a plugin to provide such a view,
disabling WebMercator specific features, and redirecting API calls
to plugin-specific implementations.
In particular, this patch disables the rendering of Map Items
(QDeclarativeGeoMapItemBase and sons) for projections different from
WebMercator, with the exception of MapQuickItems.
MapQuickItems, in turn, lose the ability to draw "on the map", when
the projection is different from WebMercator. However, they can still
be used to add geolocated popups, buttons and other UI elements.
fitViewportToMapItems is also disabled, for both it can't be computed
and there wouldn't be any item to fit (with the exception of
mapquickitems)
Change-Id: I9fa2fdd01a35a078fc4663efc9d269c4ecaa3f41
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In certain cases servers provide tiles that can be fully transparent,
provide no content or are bogus.
Tile fetchers can be smart and detect some of these cases.
This patch offers an extensible way to allow them to communicate (via
a null QImage) tiles that should not be rendered, in addition to
an extensible mechanism to identify such tiles on disk.
The default way is by assuming that, once such tiles have been
detected, the tile fetcher would simply write a file with "NoRetry" as
content.
Change-Id: I404bb4dcc38fdd33c412f7407601b47947e4ce8d
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
| |
This patch forces a camera data update upon changeActiveMapType, which
may change the tile size.
Change-Id: Ib371ea7f76267bc4ed8a30eed31ec3887b4a1415
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
| |
Change-Id: If3e920f4b4cb5bf6310914a258eb3f569de9a8ef
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Add a NoPrefetch PrefetchStyle to allow disabling the prefetching.
A new parameter in the geoservice plugin is then needed to effectively
disable it.
Change-Id: I8b8a2343cbe4f59bd990d25c3381f4a11708860e
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
| |
With this patch tiles from previous zoom levels can be temporarily
used to fill the map until the actual tiles are fetched.
Task-number: QTBUG-23659
Change-Id: I7db68c82217cb18a9bec2abdc3e679fc0bfb6b94
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently the zoomLevel is the power of 2 reflecting how many tiles
are in a map edge.
This means that two plugins with two different tileSize will show a
map of different size at the same zoomLevel.
With this patch the zoomLevel is "normalized" upon a tileSize of 256,
regardless of the tile size in use.
In this way, the new 256 based zoom level can be a consistent parameter
also for plugins that are not tile based.
CameraCapabilities therefore now offers two new methods,
m[in,ax]imumZoomLevelAt256, that return the respective value for
the normalized 256^2 tilesize.
It also gets a setTileSize, which is currently not used as all our
plugins use a tile size of 256 (which is the camera capabilities
default tilesize value).
Change-Id: Ib12092fd14faf7fc85f8be5fb799dbd5496b760b
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This cache fixes the cache mixing problem that has been introduced
with the osm high dpi tiles support.
high dpi providers fall back to low dpi ones and ultimately
to hardcoded providers (also low dpi), and can also be enabled/disabled
via plugin parameter, thus leaving the cache for a given map id
dirty for the next run.
With this patch high dpi tiles are named differently from low dpi ones.
If high-dpi providers are selected, but become not available, the
cache can also change the tileset to load at runtime
Change-Id: I229692da07c1fc61c58fb0b6fae6ec5af16e43a7
Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
|
|\
| |
| |
| | |
Change-Id: I6a1a72547077c628429ee9a0781070ad3ae787f1
|
| |\
| | |
| | |
| | | |
Change-Id: I37542960aa091ab2074914a2cebb8c5114237a26
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The current implementation is calculating the bounding box of
a geocircle based on moving along a circle of latitude by the
distance of a circle's radius. Unfortunately the distances
on a small circle of a sphere are greater than great circle
distances. Reimplement the calculation using tangential
points between a geocircle and meridians.
Do not center the viewport in the center of the geoshape,
use the center of the bounding box instead.
Simplify zoom level adjustment calculations, use the reference
world plane to get rid of longitude wrapping and rounding
erros.
Finally update a viewport unit test, adjust the minimum map
size to 256x256, so fitToViewport calls have chance to succeed.
Fix out of order test execution.
Task-number: QTBUG-54337
Change-Id: I61726a4eb7183470c493ceb03d101f3a75305121
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
After consultation, it seems that Qt favors using "At" rather than
"For" in naming a method such as "maximumLatitudeForZoom".
Moreover, this methods returns the maximum latitude that map center can
have at a specific zoom level, so it is important to make that clear
not only in the comments but also in the method's name.
Change-Id: I26f0d18f8ca94b1bdd085cd49dd603d51a68689b
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The tile prefetching code assumes that the minimum zoom is 0 for all
providers. Remove this assumption and use the actual minimum zoom
level.
Change-Id: Ifcde130eea5d4f9f0bb5449b804943eadd75512b
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Current implementation uses same QGeoCameraTiles object
to calculate visible tiles and tiles which should be
prefetched. This is semi optimal since frustum intersection
algorithm uses bunch of different parameters.
Simplify the logic and use separate objects, this way
values in both cases are cached and calculation is done when required.
This is important since prefetchData can be called
anytime from map's API.
Remove textured tiles from scene when clearCache called,
this will force redownload of all the tiles.
Add new unit test qgeotiledmap and move prefetch test
due to refactoring.
Change-Id: I6a906df405f212436cdd35ac76f95b559e6b7aae
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The QGeoTileCache is split into two classes:
The abstract class QAbstractGeoTileCache offers interfaces for inserting
and getting tiles, as well as getting cache status information such as
used texture memory.
The new class QGeoFileTileCache implements QAbstractGeoTileCache and offers
a file based caching implementation (the implementation is the same
as before splitting the class).
Change-Id: I2eab7491d489ac5b251c1296b67688901f5cc7d7
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Removes not required engine registration.
Change-Id: I5d30043a33785e0dcd798517754e846a7f420220
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
|
|
| |
Keeps the same function name across all classes.
Change-Id: I3f8b723ce513e50ea93a3fd1af99c7d2ba79a11d
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
Introduce dirty flags, remove redundant getters.
Change fetch ifdefs to switch case, so all code
gets compiled.
Change-Id: I610f20098c67089bd2c2684910283f165e1109e0
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit:
* renames class members to use m_ naming convention
* removes not required includes
* removes not required forward declarations
* adds Q_DECL_OVERRIDE
* removes prefetchTiles() call
Change-Id: I3f41cce7fcb0050adb8a5ad90304419b81476955
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
Rename all references and files with 'MapData'
to use shorter name 'Map'.
Change-Id: I8ab790146ee28e540e6866ba0218eea61bae6e64
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|