1.版本:mapbox-gl.js 2.13.0,pbf采用 postgis生成
2.调用矢量切片时,采用如下方法查询矢量切片要素,报错文章来源:https://www.toymoban.com/news/detail-650303.html
map.on('mousemove', function(e) {
var bbox = [
[e.point.x - 5, e.point.y - 5],
[e.point.x + 5, e.point.y + 5]
];
var features = map.queryRenderedFeatures(bbox, {
layers: highlightLayers
});
if (hoveredFeature) {
map.setFeatureState({
source: hoveredFeature.source,
sourceLayer: hoveredFeature.sourceLayer,
id: hoveredFeature.id
}, {
hover: false
});
文章来源地址https://www.toymoban.com/news/detail-650303.html
到了这里,关于mapbox-gl中mvt、pbf 矢量切片 feature id bug的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!