Feature request #16493
Add default XYZ services
|Category:||Web Services clients/XYZ|
|Pull Request or Patch supplied:||No||Resolution:|
|Easy fix?:||No||Copied to github as #:||24399|
Currently, adding an XYZ service is painful. I suggest adding one or more in the list.
OSM foundation agreed in letting us using their services, at the following conditions:
1. You seem to be using an user agent of "Mozilla/5.0 QGIS/2.18.3". We
strongly recommend that you don't pretend to be a browser by adding the
"Mozilla" bit. OpenStreetMap sees increasing traffic from "fake" user
agents, and it is likely that we will penalise user agents like that at
some point in the future - meaning tiles will still be served, but
slower than to "honest" user agents that don't pretend to be a browser
when they are not. We understand that this is difficult terrain and that
other data sources might actually require that you pretend to be a
browser - perhaps per-datasource overrides of the user agent are a
2. As you know, OpenStreetMap thrives on contributions by mappers, and
one of the main reasons we make our tiles freely available is the hope
of attracting new contributors. It would be nice if QGIS could do its
part to help us here, by making their users aware that OSM is open for
everyone to contribute. Perhaps a link to
http://www.openstreetmap.org/fixthemap can be placed somewhere in the
layer description or something.
a proposal by Jorge Gustavo Rocha:
2. The QGIS community is very much aware of OpenStreetMap. If we really
need to make our users more aware, does it make sense to add a new
button to QGIS to report map errors? (context dependent, when the
OpenStreetMap layer is shown) It would have the same functionality of
the notes in OpenStreetMap web interface.
3. Our data is licensed under ODbL 1.0, and our map tiles are CC-BY-SA
2.0. The latter could change at any time; the former is
The legal consequences of this situation for your users are:
- If they publish an image in which our tiles are visible, they must
attribute OpenStreetMap as the source, and specify that the map image is
CC-BY-SA 2.0, and specify that the data behind it is ODbL 1.0. All these
requirements can be fulfilled in one go by linking to
www.openstreetmap.org/copyright but there is no legal requirement to
link to that page.
3.1 On the "add layer" dialog, we can show the OpenStreetMap url (which
might change over time) and licenses (for data and tiles) taken from
settings or an (external) resource. We can make this not hard coded, to
be modified easily, without upgrading QGIS. We can also check if the
service is enabled for us, before allow users to add that layer (related
- Everyone is allowed to create derivatives of OpenStreetMap data - for
example by tracing features on the OSM tiles - and freely distribute
them. Such derived datasets, unless they are "insubstantial"
inherit the ODbL license and must, when publicly used, on request be
made available under ODbL.
3.2 When the tiles are used in the composer or on the web client, we can
not enforce an attribution string. We might add or suggest it, but users
should be free the create and edit the attributions. It the
responsibility of the user, not a QGIS responsibility.
4. If the load coming from QGIS should be unexpectedly high and impact
our service performance, there might come a time where we'd have to
throttle or even switch off this access. You should have some mechanism
or plan that deals with that to avoid frustration among your user base -
maybe a mechanism where QGIS installations request updated tile sources
from a central service so you could notify them of the OSM tiles not
being available (or being available elsewhere) should the need arise.
4. We have to handle when tiles are not loading, either because there
are network problems, server busy, etc. We can customize the user's
feedback regarding the load of the default OpenStreetMap tiles. But we
definitely need to know formally when they shut our access down. This is
related with 3.1 issue. If the access is disabled, we can also disable
adding default OpenStreetMap tiles option.
See also: https://github.com/qgis/QGIS/pull/4352Together with Etienne, Alessandro and Tim we think the following could be a good course of actions:
- add in settings an URL pointing to one page on our servers, where there will be stored: * URL of the service * user agent * licence and other notes (content to be agreed with the service provider), as html to be displayed in the popup
- add a button to the dialog for adding XYZ layers; by clicking on this, the page content will be downloaded and displayed
- the list will be refreshed at every use (or every QGIS startup), by downloading again the page above
- add on the map the credits, together with the link to the provider, as it happens currently e.g. with Quick Map Services plugin.
More details on the mailing list archives:
#3 Updated by Jürgen Fischer almost 3 years ago
The user agent is set in the network manager. There we already have the possibility to control which urls should use the proxy and which should bypass it. So it would be easy to setup a map there that also assigns specific user agents to url(prefixe)s (ie. not tied to the data source).