|
POST
|
Without seeing your code, I don't know what you already have. Is your import like this? import "@esri/calcite-components/dist/components/calcite-button";
import "@esri/calcite-components/dist/calcite/calcite.css"; and your file structure like this:
... View more
04-18-2023
02:56 PM
|
0
|
0
|
4975
|
|
POST
|
I have this simple query and want to display the results to a feature table. However, the table never appears. I believe the root of the issue is the async. So, I tried using promises to no avail. I verified that the query works and I can see results on the map and the label about the number of features found. getQuery = async (SQLwhere) => {
let thelayer = this.state.LayerObject;
let query = thelayer.createQuery();
query.where = SQLwhere;
let thevalues = [];
query.outFields = ["*"];
query.returnDistinctValues = false;
query.returnGeometry = true;
thelayer
.queryFeatures(query)
.then((results) => {
numberofgraphics = results.features.length;
const featureTable = new FeatureTable({
view: this.state.jimuMapView.view,
layer: thelayer,
container: this.tableRef.current,
});
let graphics = results.features;
numberofgraphics = graphics.length; In html <div>
<Label
id="results"
size="sm"
style={{ fontSize: 14, fontWeight: "bold", color: "red" }}
>
There are {numberofgraphics} feature(s) found.
</Label>
<div
id="tableDiv"
style={{
marginTop: "10px",
marginLeft: "10px",
width: "440px",
height: "300px",
}}
ref={this.tableRef}
/>
</div>
... View more
04-05-2023
03:00 PM
|
0
|
0
|
578
|
|
POST
|
Use double quotes and single quotes. Try: where: "STATUS = 'To Do'"
... View more
04-03-2023
10:45 AM
|
0
|
1
|
2496
|
|
POST
|
Create your own custom basemap gallery, and add the ones you want. Look at: https://developers.arcgis.com/javascript/latest/sample-code/widgets-basemapgallery/
... View more
04-03-2023
09:35 AM
|
0
|
0
|
1523
|
|
POST
|
@TonghuiMing I am trying to implement your suggested solution but it doesn't work. In my case I have the contents of a tab and want to have scrolling so users can scroll to the bottom. I drag the column and then I drag inside my custom tab widget, I set both to height auto but when I select a tab that has a lot of rows, the scrolling never appear. Before I set the height to auto: After I set up both components to height auto, a selection of a tab with lots of rows it overflows both the widget and column boundaries and no vertical scrolling bar appear. Suggestions?
... View more
03-30-2023
03:39 PM
|
0
|
1
|
3667
|
|
IDEA
|
I did something similar with the older version (3.x) using the Draw widget and modified it. Plan to do the same with sketch widget, unless if ESRI beat me to it.
... View more
03-21-2023
09:38 AM
|
0
|
0
|
1066
|
|
POST
|
Why can't you change it to icon="check" or don't use the icon so to remove it.
... View more
03-14-2023
11:52 AM
|
0
|
1
|
3501
|
|
POST
|
I found this very useful to see the changes between versions. https://developers.arcgis.com/javascript/latest/breaking-changes/
... View more
03-12-2023
02:44 PM
|
1
|
0
|
1585
|
|
POST
|
There are current issues with the selectedTitle as acknowledged by ESRI. Please use this instead. https://codepen.io/lkoumis1/pen/GRXEwyN?editors=1111
... View more
03-07-2023
01:25 PM
|
0
|
0
|
3361
|
|
POST
|
Since version 1.0.3 the event.detail.tab is depreciated. See: https://github.com/Esri/calcite-components/blob/master/CHANGELOG.md use instead: event.target.selectedTitle
... View more
03-05-2023
11:22 AM
|
2
|
2
|
3387
|
|
POST
|
UPDATE: I modified the script and it captures all sublayers. But is there an easier and more direct way of doing it? Updated script: Layer.fromArcGISServerUrl({
url: "https://tigerweb.geo.census.gov/arcgis/rest/services/TIGERweb/Urban/MapServer ",
}).then(function (layer) {
layer.when(() => {
layer.sublayers.map((sublayer) => {
const id = sublayer.id;
console.log(id);
if (sublayer.sublayers) {
sublayer.sublayers.map((sublayer1) => {
const id = sublayer1.id;
console.log(id);
});
}
});
});
}); ________________________________________________________________________________ Original Post I am trying to get access to all sublayers. However, the sublayers of a sublayer seems to be skipped of. For example, for this REST service at: https://tigerweb.geo.census.gov/arcgis/rest/services/TIGERweb/Urban/MapServer sublayers 2 and 5 are skipped off when I run this script. It seems that sublayers of a sublayer are not detected. Layer.fromArcGISServerUrl({
url: "https://tigerweb.geo.census.gov/arcgis/rest/services/TIGERweb/Urban/MapServer ",
}).then(function (layer) {
layer.when(() => {
layer.sublayers.map((sublayer) => {
const id = sublayer.id;
console.log(id);
});
});
}); Output: @Anonymous User in another posting you suggested using the method fromArcGISServerUrl but does it has limitations on sublayers?
... View more
03-01-2023
10:19 AM
|
0
|
1
|
1013
|
|
POST
|
Thank you. Looking at the documentation, it seems that in JS 4.x is more work to define visible layers of a mapimagelayer. In JS 3.x we could just write this. lyr.setVisibleLayers([1,2,3]) I assume there is no similar way of doing so in JS 4.x In a collection like MPl.sublayers.push(item) where item or comma-separated list of items cannot be the sublayer id.
... View more
02-23-2023
05:54 PM
|
0
|
0
|
1574
|
|
POST
|
I declare a mapimagelayer const MPl = new MapImageLayer({
----
---- Then I created an array of sublayers that need to be visilbe. I added the sublayers index in an array thearr.push({
id: 1,
visible: true},
{
id: 3,
visible: true}
); Then, I used: MPl.sublayers = thearr; but I got an error When I used this script without using typescript i have no errors and it runs fine.
... View more
02-22-2023
06:48 PM
|
0
|
3
|
1615
|
|
POST
|
I can use a feature layer at runtime to perform queries on it using the sample from the add-layers-to-a-map widget. However, as a training tool I was wondering how to do the same by defining the datasource and use the dataSourceComponent at runtime and skip the use of the settings component. Thanks.
... View more
02-21-2023
11:09 AM
|
0
|
1
|
670
|
|
POST
|
Just one more thing to try. Paste the url in an incognito window to see if you still see the png.
... View more
02-21-2023
09:56 AM
|
0
|
1
|
850
|
| 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
|