帖子
|
这是使用reactiveUtils的一个有趣用例。areammeasurement3d有一个带有正在绘制的几何图形的分析对象,您可以观察其变化。它在viewModel上也有一个测量对象。因此,在使用它时,您可以观察area或perimeterLength以获得这些值。这是这些显示的文本,所以不是原始数字,但看起来像在分析对象上使用的几何引擎函数的结果。watch(//查看要更新的分析几何图形()=> activeWidget.analysis?。geometry, () => console.log("analysis", activeWidget.analysis));when(//等待区域文本可用()=> activeWidget.viewModel.measurement?state === "available", () => console.log(activeWidget.viewModel.measurement));当(//等待周长文本可用()=> activeWidget.viewModel.measurement?. perimeterlength。state === "available" () => console.log(activeWidget.viewModel.measurement));演示:https://codepen.io/odoe/pen/abjYLzy?editors=1000
...查看更多
01-24-202308:55我
|
1
|
1
|
38
|
帖子
|
这是正确的。弹出窗口不支持开箱即用的对象字段。
...查看更多
01-18-2023上午10:38
|
0
|
0
|
177
|
帖子
|
你有复制品吗?Codepen还是github?否则就无从得知了。
...查看更多
01-12-202307:37我
|
0
|
0
|
42
|
帖子
|
reactiveUtils有一个选项对象,您可以在其中将“once”设置为true。https://developers.arcgis.com/javascript/latest/api-reference/esri-core-reactiveUtils.html#ReactiveListenerOptions你上面的代码片段看起来像这样,但你有它写的方式,否则是不可达的,也许主要是手表而不是whenFalse?当(()=> !Stationary, () => {console.log("view Stationary is: ", view. Stationary);当(()=>视图。Stationary, () => console.log("视图现在是固定的"),{once: true});});这里有一个带有两个选项的代码依赖器。https://codepen.io/odoe/pen/zYLwKGb?editors=0010
...查看更多
01-11-202306:59我
|
1
|
1
|
78
|
帖子
|
在require和function中,MapView和FeatureLayer的顺序互换了。在使用amd时,顺序很重要。
...查看更多
01-07-2023上午11:13
|
0
|
0
|
60
|
帖子
|
Expand小部件有一个group属性,可以为您处理这个问题。https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Expand.html#group
...查看更多
12-21-2022下午12点
|
0
|
0
|
101
|
帖子
|
你有一个回购样本显示问题,比如你正在导入什么东西。我们这里有一个4.24克拉的样品。https://github.com/Esri/jsapi-resources/tree/legacy/esm-samples/jsapi-create-react-app
...查看更多
12-20-202206:38我
|
0
|
0
|
75
|
帖子
|
MapImageLayer用于添加MapServices及其子层。https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html
...查看更多
12-19-2022上午09:43
|
0
|
1
|
62
|
帖子
|
你可能有几种方法可以做到这一点,但其中一种是使用反应式效用器。https://developers.arcgis.com/javascript/latest/api-reference/esri-core-reactiveUtils.html你可以观看弹出窗口的可见道具,然后是selectedFeature,并检查该特征来自哪个层。Watch (() => view.popup。可见,()=> {watch(() => view.popup。selectedFeature, (selectedFeature) => console.log("源层",selectedFeature.layer), {once: true});});下面是一个示例,展示如何使用它。https://codepen.io/odoe/pen/GRGVBgr?editors=1000你甚至不需要看弹出窗口可见,只看selectedFeature,但如果你分页,它不会总是打开弹出窗口。
...查看更多
12-15-2022上午09:08
|
1
|
0
|
62
|
帖子
|
我改变了样例中的值,以加载30个或更少的特征,它工作正常。您是否有显示数据问题的代码依赖?该示例演示了如何批处理applyEdits与大量功能,这样就不会阻塞地图交互。对于较小的数据集,您可能不需要批处理操作。
...查看更多
12-14-202208:10我
|
1
|
0
|
104
|
在线状态 |
离线
|
最后到访日期 |
周四
|