Skip to content

Commit

Permalink
Use the preferred openstreetmap URL to improve performance and caching
Browse files Browse the repository at this point in the history
  • Loading branch information
nirvn committed Oct 18, 2023
1 parent 1567b3d commit 91afdce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion resources/sample_projects/live_qfield_users_survey.qgs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<layer-tree-layer id="user_3b2a144b_274a_4438_95e4_6640c2211c53" expanded="1" providerKey="postgres" name="QField users" checked="Qt::Checked" source="dbname='qfielddemo' host=demo.qfield.org port=8080 user='qfielduser' sslmode=disable key='id' srid=3857 type=Point table=&quot;public&quot;.&quot;user&quot; (geom) sql=">
<customproperties/>
</layer-tree-layer>
<layer-tree-layer id="OpenStreetMap_6acb267c_fb1c_4aa5_9be1_d8ceb2ed360e" expanded="0" providerKey="wms" name="OpenStreetMap" checked="Qt::Checked" source="crs=EPSG:3857&amp;format&amp;type=xyz&amp;url=http://a.tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png&amp;zmax=19&amp;zmin=0">
<layer-tree-layer id="OpenStreetMap_6acb267c_fb1c_4aa5_9be1_d8ceb2ed360e" expanded="0" providerKey="wms" name="OpenStreetMap" checked="Qt::Checked" source="crs=EPSG:3857&amp;format&amp;type=xyz&amp;url=https://tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png&amp;zmax=19&amp;zmin=0">
<customproperties/>
</layer-tree-layer>
<custom-order enabled="0">
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgismobileapp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,7 @@ void QgisMobileapp::readProjectFile()
mProject->clear();

// Add a default basemap
QgsRasterLayer *layer = new QgsRasterLayer( QStringLiteral( "type=xyz&tilePixelRatio=1&url=https://a.tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png&zmax=19&zmin=0&crs=EPSG3857" ), QStringLiteral( "OpenStreetMap" ), QLatin1String( "wms" ) );
QgsRasterLayer *layer = new QgsRasterLayer( QStringLiteral( "type=xyz&tilePixelRatio=1&url=https://tile.openstreetmap.org/%7Bz%7D/%7Bx%7D/%7By%7D.png&zmax=19&zmin=0&crs=EPSG3857" ), QStringLiteral( "OpenStreetMap" ), QLatin1String( "wms" ) );
mProject->addMapLayers( QList<QgsMapLayer *>() << layer );
}
}
Expand Down

1 comment on commit 91afdce

@qfield-fairy
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please sign in to comment.