您好,我用mapbox加载geoserver发布的矢量切片(pbf)可以正常显示,用arcgis js4.x加载时报y值不在范围,请教下如何解决?
mapbox调用代码(正常):
var style = {
"version": 8,
"sources": {
"os": {
"type": "vector",
"scheme": "tms",
"tiles": ["http://192.168.0.137:8080/geos ... 0pbf/{z}/{x}/{y}.pbf"]
},
},
"layers": [{
"id": "gonglu_line",
"type": "line",
"source": "os",
"source-layer": "gonglu_line",
}]
};
var map = new mapboxgl.Map({
container: 'map',
style: style,
zoom: 3.5,
center: center
});
arcgis js调用代码(异常):
var style = {
"version": 8,
"sources": {
"esri": {
"type": "vector",
"scheme": "tms",
"tiles": ['http://192.168.0.137:8080/geoserver/gwc/service/tms/1.0.0/fx:fx10000dxt@EPSG:900913@pbf/{z}/{x}/{y}.pbf']
},
},
"layers": [{
"id": "gonglu_line",
"type": "line",
"source": "esri",
"source-layer": "gonglu_line",
}]
};
var vtlLayer = new VectorTileLayer({
style: style
});
map.add(vtlLayer);
调试发现请求(如http://192.168.0.137:8080/geos ... 5.pbf)报404,点进去提示 Coverage [minx,miny,maxx,maxy] is [52, 38, 52, 38, 6], index [x,y,z] is [52, 25, 6]。y值不在范围,不知道是什么原因。
var style = {
"version": 8,
"sources": {
"os": {
"type": "vector",
"scheme": "tms",
"tiles": ["http://192.168.0.137:8080/geos ... 0pbf/{z}/{x}/{y}.pbf"]
},
},
"layers": [{
"id": "gonglu_line",
"type": "line",
"source": "os",
"source-layer": "gonglu_line",
}]
};
var map = new mapboxgl.Map({
container: 'map',
style: style,
zoom: 3.5,
center: center
});
arcgis js调用代码(异常):
var style = {
"version": 8,
"sources": {
"esri": {
"type": "vector",
"scheme": "tms",
"tiles": ['http://192.168.0.137:8080/geoserver/gwc/service/tms/1.0.0/fx:fx10000dxt@EPSG:900913@pbf/{z}/{x}/{y}.pbf']
},
},
"layers": [{
"id": "gonglu_line",
"type": "line",
"source": "esri",
"source-layer": "gonglu_line",
}]
};
var vtlLayer = new VectorTileLayer({
style: style
});
map.add(vtlLayer);
调试发现请求(如http://192.168.0.137:8080/geos ... 5.pbf)报404,点进去提示 Coverage [minx,miny,maxx,maxy] is [52, 38, 52, 38, 6], index [x,y,z] is [52, 25, 6]。y值不在范围,不知道是什么原因。
3 个回复
许丹石
赞同来自:
caelan - 精彩不亮丽,起落是无常
赞同来自:
(1 << level) - row - 1 才能得到常用松散格式y值,
但是arcgis js 的 vectorTileLayer 没有提供拦截瓦片请求的方法,所以官方渠道可能没有办法解决这个问题,等一个好的解决方法
祭司
赞同来自:
要回复问题请先登录或注册
发起人
相关问题
问题状态
—— 扫技术支持中心微信服务号!
—— 让GIS知乎问答随时随地!