summaryrefslogtreecommitdiff
path: root/src/location/doc/src/plugins/osm.qdoc
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@theqtcompany.com>2016-07-11 14:27:34 +0200
committerAlex Blasche <alexander.blasche@theqtcompany.com>2016-07-27 05:36:25 +0000
commit04762a9eecafc80ebeb90c06258de551d451497f (patch)
tree1ac1ff2d6ea9f9fb448fee41aca0f2a30a50eea1 /src/location/doc/src/plugins/osm.qdoc
parent5adda3e6651f3d45838ece962a4ae656eac5af04 (diff)
downloadqtlocation-04762a9eecafc80ebeb90c06258de551d451497f.tar.gz
Add indirection for osm providers
To prevent furter breakage of qtlocation osm provider in existing qt versions, this patch introduces one level of indirection in resolving OSM providers, fetching the tile server address from files hosted at http://maps-redirect.qt.io/osm/5.6/ The content of the files requested for the server address resolution must be in JSON format, containing (currently) the following fields: { "Enabled" : bool, (optional) "UrlTemplate" : "<url template>", (mandatory) "ImageFormat" : "<image format>", (mandatory) "MapCopyRight" : "<copyright>", (mandatory) "DataCopyRight" : "<copyright>", (mandatory) "MinimumZoomLevel" : <minimumZoomLevel>, (optional) "MaximumZoomLevel" : <maximumZoomLevel>, (optional) } Enabled is optional, and allows us to temporarily disable tile providers if they go offline without firing requests to them. Default is true. MinimumZoomLevel and MaximumZoomLevel are also optional, and allow us to prevent tile requests to the providers, if they do not support the specific ZL. Default is 0 and 19, respectively. <server address template> is required, and is the tile url template, with %x, %y and %z as placeholders for the actual parameters. Example: http://localhost:8080/maps/%z/%x/%y.png <image format> is required, and is the format of the tile. Example: "png" or "jpg" <MapCopyRight> is required and is the string that will be displayed in the "Map (c)" part of the on-screen copyright notice. example: "<a href='http://www.mapquest.com/'>MapQuest</a>" <DataCopyRight> is required and is the string that will be displayed in the "Data (c)" part of the on-screen copyright notice. example: "a href= 'http://www.openstreetmap.org/copyright'>OpenStreetMap</a> contributors" The patch also adds four additional OSM plugin parameters, modifies an existing ones, and removes another existing one. Removed: - osm.mapping.copyright, now removed and replaced by two other parameters (see below). New: - osm.mapping.providersrepository.address, allowing to change the hardcoded http://maps-redirect.qt.io/osm/5.6/ The implication of this parameter is that it becomes possible to use file:// urls or even qrc:, allowing to ship custom providers with the applicarions - osm.mapping.providersrepository.disabled, allowing to disable the indirection and go with hardcoded URLs by default. - osm.mapping.custom.mapcopyright replaces the old osm.mapping.copyright, and contains the copyright notice to be displayed next to the "Map (c)" part of the copyright, to be consistent with the way the copyright notice coming from the provider data is handled - osm.mapping.custom.datacopyright replaces the old osm.mapping.copyright, and contains the copyright notice to be displayed next to the "Data (c)" part of the copyright, to be consistent with the way the copyright notice coming from the provider data is handled Modified: - osm.mapping.host now became osm.mapping.custom.host, improving the naming consistency. Task-number: QTBUG-54599 Change-Id: Iee88883572a198c00bcf54cf2bc33fbcc0498a68 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src/location/doc/src/plugins/osm.qdoc')
-rw-r--r--src/location/doc/src/plugins/osm.qdoc25
1 files changed, 20 insertions, 5 deletions
diff --git a/src/location/doc/src/plugins/osm.qdoc b/src/location/doc/src/plugins/osm.qdoc
index 1c924fd3..2fd9e7c4 100644
--- a/src/location/doc/src/plugins/osm.qdoc
+++ b/src/location/doc/src/plugins/osm.qdoc
@@ -60,15 +60,30 @@ a prefix.
\li User agent string set when making network requests. This parameter should be set to a
value that uniquely identifies the application.
\row
- \li osm.mapping.host
+ \li osm.mapping.custom.host
\li Url string set when making network requests to the tile server. This parameter should be set to a
valid server url with the correct osm api and the \l{Map::activeMapType} to the corresponding \l{MapType}.CustomMap.
The CustomMap will only be available if this parameter is set.
- \note Setting the mapping.host parameter to a new server renders the map tile cache useless for the old custommap style.
+ \note Setting the mapping.custom.host parameter to a new server renders the map tile cache useless for the old custommap style.
\row
- \li osm.mapping.copyright
- \li Custom copryright string is used when setting the \l{Map::activeMapType} to \l{MapType}.CustomMap via urlprefix parameter.
- This copyright will only be used when using the CustomMap from above. If empty no copyright will be displayed for the custom map.
+ \li osm.mapping.custom.mapcopyright
+ \li Custom map copryright string is used when setting the \l{Map::activeMapType} to \l{MapType}.CustomMap via urlprefix parameter.
+ This copyright will only be used when using the CustomMap from above. If empty no map copyright will be displayed for the custom map.
+\row
+ \li osm.mapping.custom.datacopyright
+ \li Custom data copryright string is used when setting the \l{Map::activeMapType} to \l{MapType}.CustomMap via urlprefix parameter.
+ This copyright will only be used when using the CustomMap from above. If empty no data copyright will be displayed for the custom map.
+\row
+ \li osm.mapping.providersrepository.address
+ \li The OpenStreetMap plugin retrieves the provider's information from a remote repository. This is done to prevent using hardcoded
+ servers by default, which may become unavailable. By default this information is fetched from \l {http://maps-redirect.qt.io} {maps-redirect.qt.io}.
+ Setting this parameter changes the provider repository address to a user-specified one, which must contain the files
+ \tt{street}, \tt{satellite}, \tt{cycle}, \tt{transit}, \tt{night-transit}, \tt{terrain} and \tt{hiking}.
+\row
+ \li osm.mapping.providersrepository.disabled
+ \li By default, the OpenStreetMap plugin retrieves the provider's information from a remote repository to avoid a loss of service due to unavailability of hardcoded services.
+ The plugin, however, still contains fallback hardcoded provider data, in case the provider repository becomes unreachable.
+ Setting this parameter to \b true makes the plugin use the hardcoded urls only and therefore prevents the plugin from fetching provider data from the remote repository.
\row
\li osm.routing.host
\li Url string set when making network requests to the routing server. This parameter should be set to a