arcgis Api for js var selectTool = new Select需要require什么
时间: 2024-01-27 20:04:20 浏览: 33
在 ArcGIS API for JavaScript 中创建 Select 工具时,需要先引入 `esri/widgets/Select` 模块。在代码中可以使用以下方式进行引入:
```javascript
require([
"esri/widgets/Select"
], function(Select) {
// 创建 Select 工具的代码
});
```
这样就可以使用 `Select` 构造函数来创建 Select 工具的实例了。
相关问题
要想在ArcGIS API for JavaScript中使用setRenderer,需要在Require中写什么模块
要想在ArcGIS API for JavaScript中使用setRenderer,需要在Require中写"esri/layers/FeatureLayer"模块。例如:
```javascript
require([
"esri/layers/FeatureLayer",
... //其他需要的模块
], function(FeatureLayer, ... //其他需要的模块){
//在这里使用FeatureLayer的setRenderer方法
});
```
需要注意的是,setRenderer方法是FeatureLayer对象的方法,如果要使用该方法,需要先创建FeatureLayer对象。
要想在ArcGIS API for JavaScript中使用SimpleFillSymbol,需要在Require中写什么模块
要想在ArcGIS API for JavaScript中使用SimpleFillSymbol,需要在Require中写"esri/symbols/SimpleFillSymbol"模块。例如:
```javascript
require([
"esri/symbols/SimpleFillSymbol",
... //其他需要的模块
], function(SimpleFillSymbol, ... //其他需要的模块){
//在这里使用SimpleFillSymbol
});
```
相关推荐
![7z](https://img-home.csdnimg.cn/images/20210720083312.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)