Hi,
short question about a problem I faced when migrating from api version 4.9 to 4.10. With the script below i update the attributes of a feature (in agol feature service) when running the script. In 4.9 it worked fine but it doesn't in 4.10, without any errors. I checked the release notes but couldn't find any breaking changes related to that topic. Thanks!
<script>
require([
"esri/layers/FeatureLayer",
"esri/Graphic",
"dojo/domReady!"
], function (FeatureLayer, Graphic
) {
var lyr = new FeatureLayer({
url: "https://services6.arcgis.com/..../arcgis/rest/services/Strassenbeleuchtung_Development/FeatureServer",
objectIdField: "FID",
outFields: ["*"]
});
var updateFeatArr = [];
updateFeatArr.push(new Graphic({
attributes: {LAMPENNUMM: "2", ARTVALUE: "LED", FID: 3}}));
return lyr.applyEdits({
updateFeatures: updateFeatArr
})
.then(function(results) {
});
});
</script>
Solved! Go to Solution.
Michael Lodes - this was a 4.10-specific bug about applyEdits not working unless the geometry was specified. This has been fixed. Could you give this another try and see if it works fine for you now using https://js.arcgis.com/4.10/ ?
Michael Lodes - this was a 4.10-specific bug about applyEdits not working unless the geometry was specified. This has been fixed. Could you give this another try and see if it works fine for you now using https://js.arcgis.com/4.10/ ?
Thank you Bjorn, now it works fine.
Best Regards,
Michael
Hi Bjron,
I use a local copy of the 4.10 API and I encountered in the same bug, the online 4.10 nodules work but I need a local API. Can you add the fix to the API in this page - ArcGIS for Developers?
Thanks in advance,
Tamar
Tamar Levy , the 4.10 download has now also been updated at https://developers.arcgis.com/downloads/apis-and-sdks?product=javascript&version=4.10