|
POST
|
Hi there, This is a known issue. We will install a fix for this (hoping version 4.23) and will update you once the fix is installed.
... View more
03-22-2022
12:18 PM
|
0
|
0
|
3465
|
|
POST
|
Hi there, GroupLayer is visible in the LayerList even if it empty. You won't see the arrow to expand to see the layers in the GroupLayer because the layer is empty. If you drag and drop layers into the GroupLayer then you will see the arrow to expand. Not sure if this is what you are talking about. With your code, you should see this when your app is initialized.
... View more
03-14-2022
08:38 AM
|
0
|
1
|
1555
|
|
POST
|
Hi there, So in your example, your layer will always have null values for all features except for the objectId. You can change this by setting the outFields property on the FeatureLayer so the layer fetches attributes for additional fields. I changed it so that it fetches attributes for all fields. const layers1 = new FeatureLayer({
url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/0",
featureReduction: clusterConfig,
outFields: ["*"],
popupTemplate: {
title: "city",
content: popupListContent
}
}); Then in your popupListContent, you can check if the feature has null values as shown below: function popupListContent(feature) {
const tableContent = document.createElement("table");
tableContent.classList.add('tablelayout');
tableContent.classList.add('esri-widget__table');
let infoTamplateData = "";
let object = feature.graphic.attributes;
const fieldArr = [];
if (feature.graphic.layer && feature.graphic.layer.fields) {
feature.graphic.layer.fields.forEach(element => {
// check if the feature has values
if (feature.graphic.attributes[element.name] && feature.graphic.attributes[element.name] !== null){
fieldArr.push(element.name);
}
});
}
fieldArr.forEach((f) => {
infoTamplateData += "<tr label= " + f + "><th class='esri-feature__field-header' >" +
f + " </th><td class='esri-feature__field-data'>" + object[f] + "</td> </tr>";
});
tableContent.innerHTML = infoTamplateData;
return tableContent;
}
... View more
03-11-2022
08:46 AM
|
1
|
1
|
2496
|
|
POST
|
Oh doh! Completely missed the point. 🙂 Sorry about that. This is not possible currently. We do have plans to support this scenario. I will update you once we add support for this. -Undral
... View more
03-09-2022
02:11 PM
|
0
|
1
|
3274
|
|
POST
|
Hi there, You can use the layer' queryFeatureCount method to get the count of features in the service/layer. Then you apply Clustering or remove the clustering and apply the original renderer based on the count returned from the method. Here is a simple test app showcases how this can be done. But please note that it is a contrived app: https://codepen.io/U_B_U/pen/yLPWEgZ?editors=1000
... View more
03-08-2022
10:10 AM
|
0
|
1
|
3290
|
|
POST
|
Hi there, Depends on what version of the API we are talking about here. At 4.21 and 4.22, we made improvements to refreshable layers. At 4.21: https://developers.arcgis.com/javascript/latest/4.21/#refreshable-layers, we made changes to FeatureLayer refresh logic. To reduce load on the server and minimize unnecessary requests, the FeatureLayer will only request data at its specified refreshInterval if the lastEditDate in the layer's metadata has changed. If the FeatureLayer does not have lastEditDate info, then the layer will refresh unconditionally. We added support for refreshInterval and refresh method on WFSLayer at 4.21. We added support for refreshInterval and refresh method on GeoJSONLayer, CSVLayer and GeoRSSLayer at 4.22 So if you have a FeatureLayer has has LastEditDate, then you will not see refresh requests to the service unless the lastEditDate changes (meaning the data has changed). This is the only time you will see requests to the service. For other layers, yes you should see requests at specified intervals. You will requests for all layers. Number of requests won't match the number of layers. You can see multiple requests for each layer. We need to fetch enough data to cover the view.extent.
... View more
03-08-2022
08:48 AM
|
1
|
0
|
1431
|
|
POST
|
Hi there, So at JS API version 4.22 and previous versions, you cannot change or set the spatialReference of the view after the view is initialized. If you want to set the spatialReference of the view, you must set it in the constructor. In your code, you are setting the MapView.spatialReference to Web Mercator, so you'd have to update your code as the following: const view = new MapView({
container: "viewDiv",
map: map,
scale: 36978595.474472,
center: [-130, 30],
spatialReference: {
wkid: 102100
}
}); The MapView will have the MapImageLayer's spatialReference if you do not set it in the constructor. In that case, you'd have to set the MapView.center in the spatialReference of the view as shown below: const view = new MapView({
container: "viewDiv",
map: map,
scale: 36978595.474472,
center: {
x: -130,
y: 30,
type: "point",
spatialReference: {
wkid: 4269
}
}
}); At version 4.23, your code will work as is because we are adding a support for switching MapView.spatialReference at runtime. Hope this helps, -Undral
... View more
03-07-2022
08:53 AM
|
1
|
0
|
869
|
|
POST
|
Hi there, We do not throw an error in this case. We can log error when this happens but I am not sure when it will happen. In any case, we will document this behavior clearly in the MapView doc so that it will help to troubleshoot this.
... View more
03-03-2022
10:48 AM
|
1
|
0
|
2371
|
|
POST
|
HI there, What version of the JS API are you using? I tested this at 4.22 and applyEdits works as expected when layer is not visible.
... View more
03-03-2022
08:49 AM
|
0
|
0
|
922
|
|
POST
|
Hi there, Please check out this sample as it shows what you are trying to achieve: https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=client-projection The following is the code and it waits until layer's layerView.updating becomes false when the app loads first. The LayerView.updating becomes false once it finishes updating. view.whenLayerView(countriesLayer).then((layerView) => {
watchUtils.whenFalseOnce(layerView, "updating", () => {
// enable the projection dropdown
wkidSelect.disabled = false;
calciteLoader.removeAttribute("active");
});
});
... View more
03-02-2022
01:24 PM
|
0
|
0
|
1140
|
|
POST
|
Yes indeed. We did make improvements to refreshable layers at version 4.21 and 4.22. In the process we fixed bugs as well. https://developers.arcgis.com/javascript/latest/4.21/#refreshable-layers https://developers.arcgis.com/javascript/latest/release-notes/#refreshable-layers
... View more
03-02-2022
08:36 AM
|
1
|
0
|
2363
|
|
POST
|
Hi there, What version of the JS API are you using? At 4.22, I can see that refresh is triggered at every 6 seconds exactly. The response time can vary from the server. Here is a simple test app that listens to the refresh event on the layer and it is goes off every 6 seconds: https://codepen.io/U_B_U/pen/ZEaVQmW?editors=1000
... View more
03-02-2022
07:25 AM
|
0
|
1
|
2369
|
|
POST
|
Hi there, Nothing is being displayed because your map does not have a basemap where it can derive view.scale and view.constraints.lods from. The view.zoom levels are as convenient numbers used as a shorthand for predetermined scale values. Scale values are derived from your basemaps. If you want to display your layer without a basemap, then you need to set the scale and center of your view. const view = new MapView({
container: "viewDiv",
map: map,
spatialReference: {
wkid: 102100
},
scale: 36978595.474472,
center: [-100, 35]
}); You may find this document useful as it describes about zoom levels and scales.
... View more
03-01-2022
09:01 AM
|
0
|
1
|
2401
|
|
POST
|
Very hard to tell what is going on. Can you please a provide a reproducible case if you need more help. Seems like definitionExpression changed somewhere before your queryFeatures is called.
... View more
02-28-2022
08:32 AM
|
0
|
1
|
3936
|
|
POST
|
I cannot reproduce the issue you are reporting. layer.createQuery honors all layers settings. What version of the 4.x api are you using? Is your definitiionExpression valid? If it is not then it won't make a difference. Here is a simple test app shows how createQuery works: https://codepen.io/U_B_U/pen/BamqVQK?editors=100. You can see that definitionExpression is honored in the query network request.
... View more
02-28-2022
07:20 AM
|
0
|
4
|
3944
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-17-2025 03:29 PM | |
| 1 | 07-09-2025 08:48 AM | |
| 2 | 07-08-2025 08:09 AM | |
| 2 | 07-07-2025 03:57 PM | |
| 1 | 06-11-2025 03:25 PM |
| Online Status |
Offline
|
| Date Last Visited |
12-01-2025
08:03 AM
|