|
POST
|
What is it you are trying to do? Looks like you are adding point and polygon graphics using GraphicsLayer.addMany. If you can tell me what you are expecting in your codepen then that would help.
... View more
04-27-2023
07:52 AM
|
0
|
1
|
3859
|
|
POST
|
Yep. const graphics = [graphic1, graphic2, graphic3];
bLayer.addMany(graphics);
//or
bLayer.addMany([graphic1, graphic2, graphic3]);
... View more
04-26-2023
03:49 PM
|
0
|
1
|
3939
|
|
POST
|
Yes! You can use GraphicsLayer.addMany method to add array of graphics.
... View more
04-26-2023
03:23 PM
|
0
|
3
|
3955
|
|
POST
|
Hi there, Can you please tell me what are you trying to do by achieving what you described above? Only asking because there may an easier solution. Thanks,
... View more
04-26-2023
09:08 AM
|
0
|
1
|
1362
|
|
POST
|
Hi there, The Map SDK document gives the link to the new National geographic basemap: https://www.arcgis.com/home/item.html?id=f33a34de3a294590ab48f246e99958c9 The API allows users to add basemaps by choosing one of the named basemaps (shortcut). The name must exist in the table. Since the new version is not listed in the table you cannot add it by trying different names. So you have to add the basemap from the portalItem. The Map.basemap either accepts string (must come from the named table list) or a Basemap. If you click on the basemap link then the SDK document for the basemap shows many different ways of setting up a basemap for your map. For the case of national geographic basemap, you do the following. const map = new Map({
basemap: new Basemap({
portalItem: {
id: "f33a34de3a294590ab48f246e99958c9"
}
})
});
... View more
04-26-2023
08:50 AM
|
0
|
0
|
1680
|
|
POST
|
Hi there, You can set esriConfig.request.useIdentity to false. Undral
... View more
04-14-2023
02:54 PM
|
0
|
1
|
1241
|
|
POST
|
Hi there, So the purge takes place on the client-side. The ageReceived does exactly what it says. The client timestamps features as they arrive in the browser and they are cleared after it exceeds the ageReceived time. You can set the ageReceived to be seconds... For example if you set it to 0.1, features will be cleared out once their received age exceeds 6 seconds. Sounds like you have StreamLayer.timeInfo.startField. If you do then you can set the purgeOptions.age instead. In this case, the client will purge features that exceed the given `age` (in minutes) where `age` refers to the age of the underlying feature (decided by timeInfo.startField). Setting different parameters on purgeOptions can get confusing as they all take effect. I setup this codepen for you to test the purgeOptions. 1. New features are pushed every second (set parameter) and features are cleared every two seconds since the feature was added on the map (received paramter) and 8 observations are visible at a time(ma parameter): https://codepen.io/U_B_U/pen/ExdPpdy?editors=1000&received=0.03&set=1000&max=8 You can modify the url query params to see different behaviors. I added comments where description was added. Hope this helps.
... View more
04-14-2023
11:25 AM
|
1
|
1
|
1716
|
|
POST
|
Hi there, We will look into this issue. You can use set the outline to be null as shown below and it will work. const fillSymbol = {
type: "simple-fill",
color: [227, 139, 79, 1],
outline: null
}; Thanks, -Undral
... View more
04-13-2023
08:03 AM
|
0
|
0
|
6381
|
|
POST
|
Hi there, It should work without any issues. Seems like the issue specific to your case and a reproducible case would be better to find a solution. The following code snippet sets a definitionExpression on a sublayer for a time-enabled MapImageLayer and it works as expected. const layer = new MapImageLayer({
url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/Earthquakes_Since1970/MapServer",
sublayers:[{
id: 0,
definitionExpression: "magnitude >= 8"
}]
});
... View more
04-04-2023
09:09 AM
|
0
|
1
|
1418
|
|
POST
|
Hi there, Setting attachments directly on the Feature/Graphic object does not have attachments property. If your service supports globalIds then you can use the addAttachments parameter on FeatureLayer.applyEdits. The globalIdUsed parameter for applyEdits method has a code snippet for this. I copied and pasted it here just case. You can modify it so that you are creating and adding attachments with one applyEdits. function addAttachment(selectedFeature) {
const blob = new Blob(byteArrays, { type: "image/png" });
addAttachments.push({
feature: selectedFeature,
attachment: {
globalId: "8c4d6085-a33c-42a0-8e11-21e9528bca0d",
name: "brokenLight",
data: blob
}
});
const edits = {
addAttachments: addAttachments
};
const options = {
// globalIdUsed has to be true when adding, updating or deleting attachments
globalIdUsed: true,
rollbackOnFailureEnabled: true
};
featureLayer.applyEdits(edits, options).then(function(results) {
console.log("edits added: ", results);
});
} Or you can use FeatureLayer.addAttachment method to add attachments to your feature. In this case, you will have to create the feature first, get the feature once it is created then call addAttachment method. Hope this helps, -Undral
... View more
03-31-2023
08:12 AM
|
0
|
0
|
1468
|
|
POST
|
Hi there, https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#allLayers - according to the document, allLayers collection contains basemap layers, operational layers and ground layers. Group Layers and their children layers are also part of this collection. So for MapImageLayer you'd have to use https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-MapImageLayer.html#allSublayers to get its sublayers. Same thing goes for TileLayer.
... View more
03-28-2023
03:57 PM
|
1
|
0
|
1099
|
|
POST
|
Hi @RyanSutcliffe So I am in search of a service that exhibits the behavior you describe. I haven't been able to reproduce the behavior your described above. Could you please give me more details on your map service. What version of the server are you using? Would it be possible to give me a contact info of the support analyst who was able to reproduce this issue? Thanks,
... View more
03-17-2023
01:08 PM
|
0
|
1
|
1360
|
|
POST
|
Hey there, This seems like a question for the MapService REST API. Have you posted your question here: https://community.esri.com/t5/arcgis-rest-api-questions/bd-p/arcgis-rest-api-questions
... View more
03-17-2023
12:04 PM
|
0
|
1
|
965
|
|
POST
|
Hi there, So once you create the new feature you need to query for that feature from the layer or the layer view (after it finishes updating). I modified your app so that it queries the layer for the newly added feature and use this feature to highlight the row in the table. You cannot use the graphic you created to add as a feature. Instead of you have to use the feature that exists in the layer. Hope this makes sense. The following is where the changes were made and here is a codepen: https://codepen.io/U_B_U/pen/abajbRz?editors=0010 streetlightsLayer.applyEdits({addFeatures: [graphic]})
.then((results) => {
console.log("feature added", results);
// How do I select this feature on the map and/or the featureTable
//featureTable.selectRows(graphic); // nope!
//view.highlight(results.addFeatureResults[0]); // nope!
const where = `${streetlightsLayer.objectIdField} = ${results.addFeatureResults[0].objectId}`;
let query = streetlightsLayer.createQuery();
query.where = where;
query.outFields = ["*"];
streetlightsLayer.queryFeatures(query).then((results) => {
console.log("query results", results.features);
featureTable.selectRows(results.features[0]);
});
newStreetlights.push({
objectId: results.addFeatureResults[0].objectId,
feature: results.features[0]
});
featureTable.refresh(); // needed?
})
.catch((error) => {
console.error(error);
});
... View more
03-17-2023
11:50 AM
|
1
|
1
|
1337
|
|
IDEA
|
We have plans to add support for the feature you are requesting for. Hence, I changed the status of the idea to In Product Plan.
... View more
03-17-2023
08:48 AM
|
0
|
0
|
3874
|
| 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
|