|
POST
|
Hi Divya, Sorry for the delay in getting back to you! Yes, we added it back to the documentation. Unfortunately, we won't be updating the typings for this change - the typings file is so big and it is a lot of work to get updated. You can instead edit your typings file locally at node_modules/@types/arcgis-js-api/index.d.ts To add the "edits" event for FeatureLayer: On line 284, add export type FeatureLayerEditsEventHandler = (event: FeatureLayerEditsEvent) => void; This should go after FeatureFormViewModelValueChangeEventHandler and before FeatureLayerLayerviewCreateErrorEventHandler. Next, on line 11042, add on(name: "edits", eventHandler: FeatureLayerEditsEventHandler): IHandle; This should go after updateAttachment() and before on(name: "layerview-create" ...) Let me know if this works for you! Thanks, Anne
... View more
08-10-2020
09:50 AM
|
2
|
1
|
2669
|
|
POST
|
Hi Nicolas, Thanks for reporting this! Seems like a bug with the Scale widget. We'll work to update this in a future release. Thanks again, Anne
... View more
07-27-2020
12:45 PM
|
1
|
1
|
4246
|
|
POST
|
Hi Divya, Sorry for the inconvenience, this was a bug on our side. We are working on getting the "edits" event added back to the documentation and the typings. We are planning on updating the typings next week. I'll let you know once it has been updated. Thanks! Anne
... View more
07-24-2020
03:07 PM
|
1
|
4
|
2669
|
|
POST
|
Hi Jethro, I believe the demo was updated to 4.16 this morning. jsapi-resources/4.x/npm/demo at master · Esri/jsapi-resources · GitHub Hope that helps! Anne
... View more
07-23-2020
09:24 AM
|
0
|
0
|
901
|
|
POST
|
Hi Richard, Bookmarks are only able to be added to a WebMap. They are not supported in the Map instance. We will try to clarify this in the documentation and we plan on improving the Bookmarks widget to handle this error better. Thanks for your feedback! Thanks, Anne
... View more
07-21-2020
02:49 PM
|
0
|
0
|
4946
|
|
POST
|
Hi Patrick, You could try using a function to set the content of the PopupTemplate. Here's a sample where we do this: PopupTemplate - use functions to set content | ArcGIS API for JavaScript 4.16 In your case, instead of returning a div like the sample does, you would want to return an array of FieldsContent and MediaContent. It would look something like this: const popupTemplate = {
title: 'Survey Location: <strong>{expression/display-location}</strong>',
expressionInfos: [ ... ],
content: setContent
};
function setContent(feature){
const fieldsContent = new FieldsContent({
fieldInfos: [
{
fieldName: 'expression/round-latitude'
},
{
fieldName: 'expression/round-longitude'
},
{
fieldName: 'expression/format-area'
}
]
});
if (feature.graphic.attributes.IMG != false){
const mediaContent = new MediaContent({
mediaInfos: [{
title: 'Survey Location: {expression/display-location}',
type: 'image',
value: {
sourceURL: feature.graphic.attributes.IMG
}
}]
});
return [fieldsContent, mediaContent];
}
return [fieldsContent];
} I haven't tested this out completely so it might need some tweaking, but the idea should work. Also, make sure to include "MediaContent" and "FieldsContent" in your require statement! Hope this helps! Best, Anne
... View more
07-21-2020
11:49 AM
|
0
|
2
|
1578
|
|
POST
|
Could you please share the code where you are experiencing these issues? We tested the map.on("click", ... event on this simple app (https://codepen.io/annefitz/pen/eYJgZwg ) using an iPad running iPadOS and could not reproduce the issue.
... View more
06-18-2020
02:23 PM
|
0
|
2
|
1661
|
|
POST
|
Hi Eric, I would try using Point.fromJSON() instead.
... View more
05-07-2020
04:56 PM
|
1
|
1
|
1099
|
|
POST
|
The doc should now be updated: FeatureFormViewModel.inputFields | ArcGIS API for JavaScript 4.15 We don't normally update the typings in between releases, but if you need this updated in your typings, you can either make the edit to the file locally, or in your app you could do something like (formVM as any).inputFields
... View more
05-07-2020
04:34 PM
|
0
|
3
|
1706
|
|
POST
|
Hi Tim, This is not currently possible for CIMSymbol. You could add labels to your FeatureLayer instead of doing it through the CIMSymbol. See this example: Add labels to a FeatureLayer | ArcGIS API for JavaScript 4.15 There's more information available in the API Reference: FeatureLayer.labelingInfo | ArcGIS API for JavaScript 4.15 Let me know if you have any questions. I hope this helps! Thanks, Anne
... View more
05-07-2020
03:35 PM
|
0
|
0
|
1131
|
|
POST
|
Hi Nicolas, Thanks for pointing this out! You're correct, it's supposed to be "inputFields". We will get this updated in the documentation and typings as soon as possible. Thanks again, Anne
... View more
05-04-2020
04:57 PM
|
0
|
0
|
1706
|
|
POST
|
Hi Dae, The order that you load your modules matters. In your code above, you are loading both of the coordinateFormatter and Point modules, but only reference Point inside of the then(). That makes the code think that the local Point variable is for the coordinateFormatter module, which does not have a constructor. Inside of the then(), after loadModules, try adding a local name for coordinateFormatter first, then Point, as shown below. loadModules([
'esri/geometry/coordinateFormatter',
'esri/geometry/Point'
])
.then(([
coordinateFormatter, Point
]) => {
... your code here Hope this helps! Thanks, Anne
... View more
05-04-2020
04:51 PM
|
1
|
0
|
3623
|
|
POST
|
You can use the sketchViewModel.update event to see when the geometry is being edited (as they do in the Sketch Update Validation sample). The editorViewModel.featureFormViewModel controls the Editor form - you should be able to use set featureFormViewModel.valid to false if the edited geometry is invalid, and that will disable the "update" button on the editor widget. I haven't tested this out yet, but hopefully that will get you going in the right direction! Let me know how it turns out.
... View more
04-27-2020
12:11 PM
|
0
|
1
|
2764
|
|
POST
|
Hi Markos, I'm not sure if this is exactly what you're looking for, but you could try watching the "state" property on the Editor.viewModel: editor.viewModel.watch("state", function(
newValue,
oldValue,
propertyName,
target
) {
console.log(
propertyName + " changed from " + oldValue + " to " + newValue
);
}); See it in action here: https://codepen.io/annefitz/pen/PoPjwoQ Observe the change in state in the console. Hope this helps! Anne
... View more
04-27-2020
09:28 AM
|
1
|
3
|
2764
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | yesterday | |
| 1 | 10-24-2025 07:03 AM | |
| 1 | 09-09-2025 09:52 AM | |
| 1 | 09-03-2025 01:48 PM | |
| 1 | 08-22-2025 11:12 AM |
| Online Status |
Offline
|
| Date Last Visited |
yesterday
|