arcgis 与luma.gl 结合做可视化

arcgis 在官网有个可以和webgl 结合的案例 https://developers.arcgis.com/javascript/latest/sample-code/custom-gl-visuals/ 具体做法使用webgl 制作一个自己的customLayer图层。

最近deck.gl 比较火,本质deck.gl 是基于luma.gl 来构建的可是三维组件,那么通过luma.gl 也可以做开发。今天来分享这个用luma.gl 来做。

```

luma.gl 结合

html,

body,

#viewDiv {

padding: 0;

margin: 0;

height: 100%;

width: 100%;

}

require([

"esri/WebMap",

"esri/Map",

"esri/core/watchUtils",

"esri/core/promiseUtils",

"esri/geometry/support/webMercatorUtils",

"esri/layers/GraphicsLayer",

"esri/views/MapView",

"esri/views/2d/layers/BaseLayerViewGL2D"

], function(

WebMap,

Map,

watchUtils,

promiseUtils,

webMercatorUtils,

GraphicsLayer,

MapView,

BaseLayerViewGL2D

) {

let CustomLayerView2D = BaseLayerViewGL2D.createSubclass({

constructor: function() {

this.transform = mat3.create();

this.rotation = mat3.create();

this.display = mat3.create();

this.screenTranslation = vec2.create();

this.translationToCenter = vec2.create();

this.needsUpdate = false;


更多信息参考小专栏 https://xiaozhuanlan.com/topic/1726308549

你可能感兴趣的:(arcgis 与luma.gl 结合做可视化)