java调用arcgsi切片,ArcGIS JS 4加载第三方矢量切片

现在矢量切片越来越普及,对于地图渲染能更轻更快。ArcGIS JS 4.13可以实现加载第三方矢量切片,以下为代码示例,最下方是我之前切的建筑物数据。
    当切片大小在1M左右,加载效果还是可以。不过跟mapbox gl相比还是有些逊色,mapbox gl可以加载6M大小的切片,但ArcGIS JS 4却不行。矢量切片还是需要控制好大小,这样才能快速传输和渲染。

var style = {

"version": 8,

"sources": {

"osm": {

"tiles": ["https://osm-lambda.tegola.io/v1/maps/osm/{z}/{x}/{y}.pbf"],

"type": "vector"

}

},

"layers": [

{

id: "land",

type: "fill",

source: "osm",

"source-layer": "land",

minzoom: 0,

maxzoom: 24,

paint: {

"fill-color": "rgba(150, 150, 150, 1)"

}

}

],

"id": "test"

}

require([

"esri/Map",

"esri/views/MapView",

"esri/layers/VectorTileLayer",

"dojo/domReady!"

], function(Map, MapView, VectorTileLayer) {

var map = new Map();

var view = new MapView({

container: "map",

map: map,

center: [-98.5795, 39.8283],

zoom: 2,

});

var tileLyr = new VectorTileLayer({

style: style

});

map.add(tileLyr);

});

aedc85d3f35b9ec894534e5d37c116c5.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值