MapBox和TIFF [英] MapBox and TIFF

查看:656
本文介绍了MapBox和TIFF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在MapBox的地图上显示我的TIFF文件.我从以下示例开始: https://www.mapbox.com /mapbox-gl-js/example/vector-source/通过替换

I am trying to show my TIFF file at the MapBox's map. I am starting with this example: https://www.mapbox.com/mapbox-gl-js/example/vector-source/ by replacing

map.addSource('terrain-data', {
    type: 'vector',
    url: 'mapbox://mapbox.mapbox-terrain-v2'
});

map.addSource('terrain-data', {
    type: 'vector',
    url: 'mapbox://xxx.yyy'
});

其中xxx.yyy是我的帐户数据部分中的Map ID( https://www .mapbox.com/studio/data/)

where xxx.yyy is my Map ID from Data section of the account (https://www.mapbox.com/studio/data/)

JavaScript启动所需的调用(对某些jpg文件),但所有调用都带有404错误和以下消息:{"message":"Tile does not exist"}

JavaScript initiates needed calls (to some jpg files), but all of them come with 404 error and the following message: {"message":"Tile does not exist"}

推荐答案

如果xxx.yyy是TIFF上传产生的图块,则它是

If xxx.yyy is a tileset resulting from a TIFF upload, it's a raster source, not a vector source. You will need to replace type: 'vector' with type: 'raster', specify tileSize: 256, and use it as the source for raster layers.

这篇关于MapBox和TIFF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆