QGIS 导入XYZ常用地图

1. 准备 XML 文件

准备 qgis-xyz-tiles.xml 文件,内容如下:

<!DOCTYPE connections>
<qgsXYZTilesConnections version="1.0">
    <xyztiles url="https://services.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}" name="ESRI 卫星" authcfg="" password="" http-header:referer="https://www.arcgis.com/" referer="https://www.arcgis.com/" tilePixelRatio="1" zmin="1" username="" zmax="20"/>
    <xyztiles url="https://services.arcgisonline.com/arcgis/rest/services/Elevation/World_Hillshade/MapServer/tile/{z}/{y}/{x}" name="ESRI 山影" authcfg="" password="" http-header:referer="https://www.arcgis.com/" referer="https://www.arcgis.com/" tilePixelRatio="1" zmin="1" username="" zmax="20"/>
    <xyztiles url="https://map.geoq.cn/arcgis/rest/services/ChinaOnlineCommunity/MapServer/tile/{z}/{y}/{x}" name="ESRI 道路" authcfg="" password="" http-header:referer="http://www.arcgisonline.cn/" referer="http://www.arcgisonline.cn/" tilePixelRatio="1" zmin="1" username="" zmax="19"/>
    <xyztiles url="https://s3.amazonaws.com/elevation-tiles-prod/terrarium/{z}/{x}/{y}.png" name="Mapzen Global Terrain" authcfg="" password="" http-header:referer="" referer="" tilePixelRatio="0" zmin="0" username="" zmax="15"/>
    <xyztiles url="https://a.tile.thunderforest.com/transport/{z}/{x}/{y}.png?apikey=6170aad10dfd42a38d4d8c709a536f38" name="OSM 交通路网" authcfg="" password="" http-header:referer="https://www.openstreetmap.org/" referer="https://www.openstreetmap.org/" tilePixelRatio="1" zmin="1" username="" zmax="19"/>
    <xyztiles url="https://tile-c.openstreetmap.fr/hot/{z}/{x}/{y}.png" name="OSM 人道救援" authcfg="" password="" http-header:referer="https://www.openstreetmap.org/" referer="https://www.openstreetmap.org/" tilePixelRatio="1" zmin="1" username="" zmax="19"/>
    <xyztiles url="https://tileserver.memomaps.de/tilegen/{z}/{x}/{y}.png" name="OSM 公共交通" authcfg="" password="" http-header:referer="https://www.openstreetmap.org/" referer="https://www.openstreetmap.org/" tilePixelRatio="1" zmin="1" username="" zmax="19"/>
    <xyztiles url="https://tile.openstreetmap.org/{z}/{x}/{y}.png" name="OSM 标准" authcfg="" password="" http-header:referer="https://www.openstreetmap.org/" referer="https://www.openstreetmap.org/" tilePixelRatio="1" zmin="1" username="" zmax="19"/>
    <xyztiles url="https://c.tile-cyclosm.openstreetmap.fr/cyclosm/{z}/{x}/{y}.png" name="OSM 自行车" authcfg="" password="" http-header:referer="https://www.openstreetmap.org/" referer="https://www.openstreetmap.org/" tilePixelRatio="1" zmin="1" username="" zmax="19"/>
    <xyztiles url="https://c.tile.thunderforest.com/cycle/{z}/{x}/{y}.png?apikey=6170aad10dfd42a38d4d8c709a536f38" name="OSM 骑行运动" authcfg="" password="" http-header:referer="https://www.openstreetmap.org/" referer="https://www.openstreetmap.org/" tilePixelRatio="1" zmin="1" username="" zmax="19"/>
    <xyztiles url="https://tile.openstreetmap.org/{z}/{x}/{y}.png" name="OpenStreetMap" authcfg="" password="" http-header:referer="" referer="" tilePixelRatio="0" zmin="0" username="" zmax="19"/>
    <xyztiles url="https://mt1.google.com/vt/lyrs=s&amp;x={x}&amp;y={y}&amp;z={z}" name="谷歌卫星" authcfg="" password="" http-header:referer="https://www.google.com/" referer="https://www.google.com/" tilePixelRatio="1" zmin="0" username="" zmax="21"/>
    <xyztiles url="https://gac-geo.googlecnapps.cn/maps/vt?lyrs=s&amp;x={x}&amp;y={y}&amp;z={z}" name="谷歌卫星(国内转发)" authcfg="" password="" http-header:referer="" referer="" tilePixelRatio="1" zmin="0" username="" zmax="21"/>
    <xyztiles url="https://mt2.google.com/vt/lyrs=m&amp;x={x}&amp;y={y}&amp;z={z}" name="谷歌道路" authcfg="" password="" http-header:referer="https://www.google.com/" referer="https://www.google.com/" tilePixelRatio="1" zmin="0" username="" zmax="21"/>
    <xyztiles url="https://gac-geo.googlecnapps.cn/maps/vt?lyrs=m&amp;x={x}&amp;y={y}&amp;z={z}" name="谷歌道路(国内转发)" authcfg="" password="" http-header:referer="" referer="" tilePixelRatio="1" zmin="0" username="" zmax="21"/>
    <xyztiles url="https://webst02.is.autonavi.com/appmaptile?lang=zh_cn&amp;size=1&amp;scale=1&amp;style=7&amp;x={x}&amp;y={y}&amp;z={z}" name="高德地图" authcfg="" password="" http-header:referer="https://www.arcgisonline.cn/" referer="https://www.arcgisonline.cn/" tilePixelRatio="1" zmin="4" username="" zmax="19"/>
</qgsXYZTilesConnections>

2.导入QGIS

打开QGIS,在 XYZ Tiles加载连接 ,导入准备好的文件即可。

posted @ 2023-02-28 16:09  xustch  阅读(857)  评论(0编辑  收藏  举报