当前位置:网站首页>Cesium geojson数据的添加与移除
Cesium geojson数据的添加与移除
2022-07-17 05:06:00 【Wxy4Z1zzz】
1、定义GeoJson:首先定义GeoJsonDataSource,加载GeoJson。

2、添加GeoJson:将定义好的GeoJson添加到viewer的dataSources中。

这里要注意:
(1)给定义好的GeoJson赋一个name,默认name为undefined。name可以是英文也可以是中文,但一定要保证唯一性。
(2)使用 then 方法,直接给GeoJson定义name会导致与GeoJson自带的name对应不上。
3、移除GeoJson:根据GeoJson的name字段,来判断移除地图场景上的哪一个GeoJson数据。

4、如果要全部移除,直接使用 removeAll。

边栏推荐
- 读论文《Learning to Measure Changes: Fully Convolutional Siamese Metric Networks for Scene Change Detec》
- es6新增-数组部分
- 【C语言—零基础第十三课】字符串的奥秘
- ThreadLocal thread safety example and its principle
- STL容器——vector的基本操作
- 02_电影推荐(ContentBased)_用户画像
- Two JS methods of rolling wheel loading and modal box dragging
- (精讲)Es6 剩余参数,ES6内置对象,模板字符串内容(详例宝典)及灵活运用项目的实战案例
- 【C语言—零基础第十一课】旋转大转盘之指针
- ES6 latest commonly used knowledge dictionary (which can help you solve interview questions, problems in programming, etc.)
猜你喜欢

PCA feature dimensionality reduction of machine learning + case practice

Simply and quickly establish a pytorch environment yolov5 target detection model to run (super simple)

Mongo DB aggregate operations and indexes

NVIDIA GeForce Experience登录报错:验证程序加载失败,请检查您的浏览器设置,例如广告拦截程序(解决办法)

一个问题的探讨

MapBox 加载本地离线地形

es6新增-Symbol数据类型

基于RTX30显卡的ArcGIS Pro2.8深度学习环境配置

这么6的刷题网站你不会没听说过吧?你已经out 了?

uniapp 使用uview实现折叠面板
随机推荐
Three high concurrency methods to realize I++
Flex弹性布局
Two methods of rotation chart and automatic rotation
STL容器——vector的基本操作
PAT乙级1002:写出这个数
[2022 10th Teddy Cup Challenge] Title A: complete version of pest identification (general idea. Detailed process and code and results CSV in compressed package)
01_电影推荐(ContentBased)_物品画像
Applet editor rich text editing and rich text parsing
es6新增-运算符的扩展
C语言练习2
父组件加scoped有时也会影响子组件
02_電影推薦(ContentBased)_用戶畫像
使用js中的(offset,page)实现登录效果
基于cuda10.0的pytorch深度学习环境配置
computed和watch的区别
Submit the uniapp form (input, radio, picker) to get the parameter value
Get the multi-functional version of the maximum and minimum values of the internal values of the objects in the array and the full version of the roll call system, and show the effect
STL容器——set集合的应用
Wechat applet cloud development and use method-1
Use (offset, page) in JS to achieve login effect