我正在寻找一种在QGis中显示我的Mapbox地图的方法(在mapbox上编辑的基本图层以及从tilemill上载的数据).
I'm looking for a way to display one of my Mapbox map in QGis (baselayer edited on mapbox & data uploaded from tilemill).
这里有人已经找到方法了吗?有功能或插件可以做到这一点吗?
Did someone here already find a way ? Is there a feature or a plugin to do that ?
感谢您将来的回答!
Adrien
推荐答案昨天,我自己找到了两个解决方案:
Yesterday, I found two solutions by myself :
1)漂亮的官方"TileLayer插件" QGis插件
您必须编写一个TSV文件(制表符分隔值),至少要包含Mapbox地图的名称,名称和URL.该网址应如下所示:
You'll have to write a TSV file (Tab Separated Values) with, at least, the name, the credits and the URL of your Mapbox map. The URL should look like :
a.tiles.mapbox/v3/mapboxId.mapId/{z}/{x}/{y}.png您只需要用您的ID替换mapboxId和mapId.请参阅插件的github存储库,以获取更多信息和要添加到您的TSV文件中的值(minZoom,maxZoom等).
You just have to replace mapboxId and mapId with your ids. See the github repository of the plugin for further informations and values to add to your TSV file (minZoom, maxZoom, etc).
然后,在插件的设置"菜单中,将插件链接到TSV文件的目录(外部图层目录").
Then, in the "settings" menu of the plugin, link the plugin to the directory of your TSV file ("external layers directory").
最后,在插件的添加"菜单中,选择您的地图,然后单击添加".
Finally, in the "add" menu of the plugin, select your map and click "add".
2)一个解释为栅格的XML文件
使用以下代码编写XML文件:
Write a XML file with this code :
<GDAL_WMS> <Service name="TMS"> <ServerUrl>a.tiles.mapbox/v3/mapboxId.mapId/${z}/${x}/${y}.png</ServerUrl> </Service> <DataWindow> <UpperLeftX>-20037508.34</UpperLeftX> <UpperLeftY>20037508.34</UpperLeftY> <LowerRightX>20037508.34</LowerRightX> <LowerRightY>-20037508.34</LowerRightY> <TileLevel>18</TileLevel> <TileCountX>1</TileCountX> <TileCountY>1</TileCountY> <YOrigin>top</YOrigin> </DataWindow> <Projection>EPSG:3857</Projection> <BlockSizeX>256</BlockSizeX> <BlockSizeY>256</BlockSizeY> <BandsCount>3</BandsCount> <Cache /> </GDAL_WMS>再次,用您的ID替换ID.然后,以QGis文件格式打开文件.
Once again, replace the ids with yours. Then, open the file in QGis as a raster.
更多推荐
在QGis中打开Mapbox地图
发布评论