|
POST
|
Thank you for your response. For the listing of the React versions, I was suggesting to change the table format shown on this page by adding the last column. https://developers.arcgis.com/experience-builder/guide/release-versions/ to this: Thank you.
... View more
01-04-2023
08:32 AM
|
0
|
2
|
2088
|
|
POST
|
In ExB v. 1.10 the supported version of React is 17.0.2. As a developer for custom widgets in ExB, would like to use some of the npm packages in my application. However, some of them require React 18.x So, here is my question. Can we upgrade React to 18.x, and if so, how can we perform the upgrade without affecting the functionality of ExB? As a side note, I think it would be very useful to include on the table for ExB versions, a column with the version of React supported. https://developers.arcgis.com/experience-builder/guide/release-versions/ @Jianxia ? Thank you.
... View more
01-02-2023
02:27 PM
|
1
|
4
|
2170
|
|
POST
|
I am trying to use this script from the ArcGIS JS API to zoom in for a client-side feature layer. However, I get the error on line 7 due to the 'this' keyword. The prop is necessary since I am referring to the view from another module as suggested from another posting. The error is related to the 'this' in a class component. I tried to bind the goTo but didn't work. @RobertScheitlin__GISP , @Grant-S-Carroll or anyone else? Thank you. this.props.mapView.goTo(response.extent).bind(this); Error: Script: this.props.mapView.whenLayerView(layer).then(function (layerView) {
layerView.watch("updating", function (val) {
// wait for the layer view to finish updating
if (!val) {
layerView.queryExtent().then(function (response) {
// go to the extent of all the graphics in the layer view
this.props.mapView.goTo(response.extent);
});
}
});
});
... View more
12-30-2022
09:36 AM
|
0
|
1
|
809
|
|
POST
|
JoelBennett is correct. map.allLayers.forEach(layer => {
// Query all layers data
if (layer.type === "feature" && layer.visible){
layer.queryFeatures(query)
.then((results) => {
// do something with query results
console.log(results)
})
.catch(errorCallback);
}
});
... View more
12-23-2022
08:34 AM
|
1
|
0
|
2095
|
|
POST
|
I use the select from the jimu-ui . Here is my question. I have a clear button to enable the user to reset all the controlled components on the ui to their original state. I am using the placeholder for the select. How do I display the placeholder value when the clear button is pressed? I can use the setState to return the Select to its original value, but not the placeholder text on the display. Use of the ref won't help since it doesn't re-render.
... View more
12-02-2022
12:22 PM
|
0
|
1
|
2197
|
|
POST
|
THank you. I got this error. Question. Should we use the componentDidMount to update the jimuMapView state to avoid async errors?
... View more
11-28-2022
06:22 PM
|
0
|
1
|
5387
|
|
POST
|
@RobertScheitlin__GISP After I was passing the jimuMapView.view to the the child component <div>{<ChildComponent mapView={this.state.jimuMapView.view} />}</div> I am getting the error "Cannot read properties of null (reading 'view')" at runtime. of the line above. It seems that there is async error. The 'this.state.jimuMapView' seems to be null. To address it, I used this from the FeaturePanel, to no avail: activeViewChangeHandler = (jimuMapView: JimuMapView) => {
if (null === jimuMapView || undefined === jimuMapView) {
this.setState({ jimuMapView: null });
return; //skip null
}
this.setState({ jimuMapView: jimuMapView });
}; How can the rendering of the component be delayed until the jimuMapView is not null.
... View more
11-28-2022
03:45 PM
|
0
|
3
|
5394
|
|
POST
|
Yes, you are correct. What a novice mistake. Thank you.
... View more
11-23-2022
08:01 AM
|
0
|
0
|
5411
|
|
POST
|
THank you. I followed the first method I am almost there. In the child component, I console log the and I get this: I want to access the this.props.mapView.view which it is a property because under it is the map module. However, when I console log I get the red underline that the view is not a property of the mapView, however the console outputs the x coordinate. Why does it works? I was able to add a layer using the this.props.mapView.view.map.add This is confusing. Thank you.
... View more
11-22-2022
06:09 PM
|
0
|
0
|
5423
|
|
POST
|
Hello. A React newbie here. I have a long script and for the purpose of managing the code I split it to different components. I have the widget (parent) component that I store the selected map in the jimuMapView. Then, I have the children components that need to use the props of the jimuMapView so they add layers and graphics to that map, or other actions like zoom and so forth. So, my question is how in the children components I can access the jimuMapView from the parent to add the layers? None of the documentation or examples in ESRI address this scenario. @RobertScheitlin__GISP , @Grant-S-Carroll or anyone else? Thank you.
activeViewChangeHandler = (jmv: JimuMapView) => {
if (jmv) {this.setState({ jimuMapView: jmv }); }
};
<div className="widget-addLayers jimu-widget p-2">
{this.props.hasOwnProperty("useMapWidgetIds") &&
this.props.useMapWidgetIds &&
this.props.useMapWidgetIds[0] && (
<JimuMapViewComponent
useMapWidgetId={this.props.useMapWidgetIds?.[0]}
onActiveViewChange={this.activeViewChangeHandler}
/>
)}
... View more
11-22-2022
10:39 AM
|
0
|
8
|
5463
|
|
POST
|
Newbie with React. I have a long code so I split it to different components. I have the main widget.tsx component and I imported another component PMtoXY to it. import PMtoXY from "./PMtoXY"; In the widget, I defined the jimuMapView to access the selected map (script below). In the PMtoXY, I defined a feature layer and want to add it to the map. How do I access the current state of the jimuMapView in the PMtoXY? import {
JimuMapViewComponent,
JimuMapView,
} from "jimu-arcgis";
=====
interface IState {
jimuMapView: JimuMapView;
----
----
state = {
jimuMapView: null,
-----
----
activeViewChangeHandler = (jmv: JimuMapView) => {
if (jmv) {
this.setState({ jimuMapView: jmv });
}
};
------
-----
render() {
return (
<div className="widget-addLayers jimu-widget p-2">
{this.props.hasOwnProperty("useMapWidgetIds") &&
this.props.useMapWidgetIds &&
this.props.useMapWidgetIds[0] && (
<JimuMapViewComponent
useMapWidgetId={this.props.useMapWidgetIds?.[0]}
onActiveViewChange={this.activeViewChangeHandler}
/>
)}
--------
--------
... View more
11-18-2022
12:59 PM
|
0
|
1
|
1707
|
|
POST
|
In my case, the description is first entered before I publish the service in ArcGIS Pro. Once I entered the description in ArcGIS Pro the description appears after I publish it in the REST service. Do you follow the same workflow?
... View more
11-08-2022
08:28 AM
|
1
|
1
|
904
|
|
POST
|
For anyone who may have the same question, this is what I did I placed my data folder under the src/runtime and instead of fetch, I used import data from "./data/info.json"; If you run into issues accessing your json file, then add this: const loadedData = JSON.stringify(data);
const json = JSON.parse(loadedData);
... View more
11-02-2022
10:55 AM
|
0
|
0
|
1218
|
|
POST
|
What's the recommendation to where to place a json file in the ExB file structure and how to access it with the local pathname. I am using fetch to read the json file but it seems that I cannot to access it if I use a local file.
... View more
11-01-2022
05:19 PM
|
1
|
1
|
1259
|
|
POST
|
THank you. After I posted the question, I found them. However, I am looking for the Table widget which is not listed under dist/widgets/arcgis
... View more
10-21-2022
02:41 PM
|
0
|
2
|
1869
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 2 weeks ago | |
| 1 | 2 weeks ago | |
| 1 | 06-19-2025 10:13 PM | |
| 3 | 02-06-2026 10:44 AM | |
| 1 | 01-08-2026 12:50 PM |
| Online Status |
Offline
|
| Date Last Visited |
2 weeks ago
|