ArcGIS JS Api 4.x修改三维球背景技巧

    通过修改scenceview.js中tileBackground和defaultTileBackground中的png的base64编码就可以达到要求。
4.8中通过修改scenceview.js
e.DEFAULT_TILE_BACKGROUND = typeof dojoconfig!=undefined &&dojoconfig.bg!=undefined?dojoconfig.bg:"原来的base64"
在html中引用init.js前
<script > var dojoconfig={bg:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAGUklEQVR4Xu3UQQ0AIBADQQhmeOPfGyTY2DkHnV461z53OAIEkgLTACR7F5rAFzAAHoFAWMAAhMsXnYAB8AMEwgIGIFy+6AQMgB8gEBYwAOHyRSdgAPwAgbCAAQiXLzoBA+AHCIQFDEC4fNEJGAA/QCAsYADC5YtOwAD4AQJhAQMQLl90AgbADxAICxiAcPmiEzAAfoBAWMAAhMsXnYAB8AMEwgIGIFy+6AQMgB8gEBYwAOHyRSdgAPwAgbCAAQiXLzoBA+AHCIQFDEC4fNEJGAA/QCAsYADC5YtOwAD4AQJhAQMQLl90AgbADxAICxiAcPmiEzAAfoBAWMAAhMsXnYAB8AMEwgIGIFy+6AQMgB8gEBYwAOHyRSdgAPwAgbCAAQiXLzoBA+AHCIQFDEC4fNEJGAA/QCAsYADC5YtOwAD4AQJhAQMQLl90AgbADxAICxiAcPmiEzAAfoBAWMAAhMsXnYAB8AMEwgIGIFy+6AQMgB8gEBYwAOHyRSdgAPwAgbCAAQiXLzoBA+AHCIQFDEC4fNEJGAA/QCAsYADC5YtOwAD4AQJhAQMQLl90AgbADxAICxiAcPmiEzAAfoBAWMAAhMsXnYAB8AMEwgIGIFy+6AQMgB8gEBYwAOHyRSdgAPwAgbCAAQiXLzoBA+AHCIQFDEC4fNEJGAA/QCAsYADC5YtOwAD4AQJhAQMQLl90AgbADxAICxiAcPmiEzAAfoBAWMAAhMsXnYAB8AMEwgIGIFy+6AQMgB8gEBYwAOHyRSdgAPwAgbCAAQiXLzoBA+AHCIQFDEC4fNEJGAA/QCAsYADC5Yt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OwAD4AQJhAQMQLl90AgbADxAICxiAcPmiEzAAfoBAWMAAhMsXnYAB8AMEwgIGIFy+6AQMgB8gEBYwAOHyRSdgAPwAgbCAAQiXLzoBA+AHCIQFDEC4fNEJGAA/QCAsYADC5YtOwAD4AQJhAQMQLl90AgbADxAICxiAcPmiEzAAfoBAWMAAhMsXnYAB8AMEwgIGIFy+6AQMgB8gEBYwAOHyRSdgAPwAgbCAAQiXLzoBA+AHCIQFDEC4fNEJGAA/QCAsYADC5YtOwAD4AQJhAQMQLl90Ag9l/10QBTEYHAAAAABJRU5ErkJggg=="} </script>
传入图片base64编码,这样三维球就可以按照我们想要的颜色渲染,图片分辨率最好是标准的2x2 4x4 8x8 16x16 32x32 64x64 128x128 256x256。

```
<!DOCTYPE html>

 
<meta charset="utf-8"> 
菜鸟教程(runoob.com) 

您的浏览器不支持 HTML5 canvas 标签。

```
ArcGIS JS Api 4.x修改三维球背景技巧
ArcGIS JS Api 4.x修改三维球背景技巧
ArcGIS JS Api 4.x修改三维球背景技巧

上一篇:arcgis js api 4.X 自定义工具按钮


下一篇:关于双击事件.MouseEvent.DOUBLE_CLICK