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
Conversation
Ooooh careful here - we can't ship with the esri or Google tiles, that's asking for trouble! |
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. |
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" ); |
There was a problem hiding this comment.
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.
Yes, please. That is the correct way to do this. Put it in the global
settings file.
…On Wed, Mar 7, 2018 at 8:37 AM, Luigi Pirelli ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/providers/wms/qgswmsdataitems.cpp
<#6546 (comment)>:
> @@ -488,6 +496,38 @@ void QgsXyzTileRootItem::newConnection()
QgsXyzConnectionUtils::addConnection( dlg.connection() );
refreshConnections();
}
+
+void QgsXyzTileRootItem::addDefaultXYZServers()
+{
+ QMap<QString, QString> defaultXYZServers;
+ defaultXYZServers[QStringLiteral( "OpenStreetMap Mapnick" )] = QStringLiteral( "http://tile.openstreetmap.org/{z}/{x}/{y}.png" );
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.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#6546 (review)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAXS3JpxZCaKvtXIERTFu7WbkTaBrWLaks5tbw-tgaJpZM4SfXSq>
.
|
OSM tiles is already availableIn 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 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. The data about the OSM service is not hard coded. It is in No code requiredThis can be accomplished without any code. Just add those entries to CustomizationSince no code is required to have additional XYZ provides, companies deploying QGIS can custumize additional XYZ provides. Thanks @luipir and @nyalldawson for previous comments. |
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 👍 |
Thanks for adding these. We don't want troubles or law suits. |
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. |
hei @slarosa no problem... that's the sense of review :) |
You are right @slarosa. Users should know how to add these optional map sources to QGIS, using You could write a nice post about "QGIS 3: How to add more default XYZ servers?" in your blog. |
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 :-)
[0] - https://www.spatialbias.com/2018/02/qgis-3.0-xyz-tile-layers/
Checklist
fixes #11111
in the commit message next to the description[FEATURE]
in the commit message[needs-docs]
in the commit message and containt sufficient information in the commit message to be documentedscripts/prepare-commit.sh
script before each commit