Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allows to add default XYZ Tiles Servers #6546

Closed
wants to merge 1 commit into from

Conversation

slarosa
Copy link
Member

@slarosa slarosa commented Mar 6, 2018

Description

This PR adds an action which allows adding some default XYZ servers [0] from Browser Panel. I wondering if this could be useful for users which feel lost without QMS plugin :-)

default_xyz_servers

[0] - https://www.spatialbias.com/2018/02/qgis-3.0-xyz-tile-layers/

Checklist

Reviewing is a process done by project maintainers, mostly on a volunteer basis. We try to keep the overhead as small as possible and appreciate if you help us to do so by completing the following items. Feel free to ask in a comment if you have troubles with any of them.

  • Commit messages are descriptive and explain the rationale for changes
  • Commits which fix bugs include fixes #11111 in the commit message next to the description
  • Commits which add new features are tagged with [FEATURE] in the commit message
  • Commits which change the UI or existing user workflows are tagged with [needs-docs] in the commit message and containt sufficient information in the commit message to be documented
  • I have read the QGIS Coding Standards and this PR complies with them
  • This PR passes all existing unit tests (test results will be reported by travis-ci after opening this PR)
  • New unit tests have been added for core changes
  • I have run the scripts/prepare-commit.sh script before each commit

@nyalldawson
Copy link
Collaborator

Ooooh careful here - we can't ship with the esri or Google tiles, that's asking for trouble!

@nyalldawson
Copy link
Collaborator

What I'm wondering here is whether it's better to just add the (suitably licensed) ones by default, like we do now for OSM. I think that might be a better approach, because it avoids the action which is hard to discover, and users can easily remove default ones they don't want.

@luipir
Copy link
Contributor

luipir commented Mar 6, 2018

as far as I rememebr there where a discussion and or PR by @jgrocha regarding add or not by default OSM tiles.

void QgsXyzTileRootItem::addDefaultXYZServers()
{
QMap<QString, QString> defaultXYZServers;
defaultXYZServers[QStringLiteral( "OpenStreetMap Mapnick" )] = QStringLiteral( "http://tile.openstreetmap.org/{z}/{x}/{y}.png" );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about to have all these defaults get from the global settings of QgsSettings? in this way QGIS package can be customised basing on what is the target.

@NathanW2
Copy link
Member

NathanW2 commented Mar 6, 2018 via email

@jgrocha
Copy link
Member

jgrocha commented Mar 6, 2018

OSM tiles is already available

In previous discussions, we decided (on dev list) just to provide OSM tiles by default. OSM database and tile usage license is clear.

We we also talked with OSMF about this option in QGIS and we use our User-Agent to let them know that is QGIS requesting the tiles.

That's why we already have OSM tiles available by default (PR #5000). If you start QGIS 3 for the first time (just create another profile to start with default settings) you will see the default OSM tiles.

osm default xyz tiles

The data about the OSM service is not hard coded. It is in resources/qgis_global_settings.ini. If, for some reason, we choose another tile provider, we just need to change the default settings distributed with QGIS.

No code required

This can be accomplished without any code. Just add those entries to resources/qgis_global_settings.ini.

Customization

Since no code is required to have additional XYZ provides, companies deploying QGIS can custumize additional XYZ provides.

Thanks @luipir and @nyalldawson for previous comments.

@nyalldawson
Copy link
Collaborator

Just to clarify my position -- I'm all for adding more tiles in the default install, so long as we're playing by the rules 👍

@andreasneumann
Copy link
Member

Thanks for adding these.
However, I agree with Nyall and others. Do not add ESRI/Google/Bing tiles unless we have written approval by them that we are allowed to include them.

We don't want troubles or law suits.

@slarosa
Copy link
Member Author

slarosa commented Mar 7, 2018

Sorry, I did not want break the rules, really that was not my intention, and I did not remember @jgrocha's PR, so it is not necessary to add further code here to do that.

My intention was add some default server as I am seeing much community requests about the difficulty to display base tile layers.

Thanks all and sorry for the noise.

@slarosa slarosa closed this Mar 7, 2018
@luipir
Copy link
Contributor

luipir commented Mar 7, 2018

hei @slarosa no problem... that's the sense of review :)
BTW it's clear that make sense to add the QAction "add defaults" and it'zs good improvements to avoid initial users to be lost without base maps.

@jgrocha
Copy link
Member

jgrocha commented Mar 7, 2018

You are right @slarosa. Users should know how to add these optional map sources to QGIS, using qgis_global_settings.ini or taking adantage of user profiles. This lacks documentation.

You could write a nice post about "QGIS 3: How to add more default XYZ servers?" in your blog.

@slarosa slarosa deleted the add_default_xyz_servers branch October 12, 2020 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants