Hi, all
I used saveAs function of WebMap including FeatureLayers. The WebMap is successfully imported to arcgis online. But FeatureLayers disappear. However, I can see the layers through the thumbnail (the orange area is FeatureLayer I added to the WebMap with javascript). What's the reason causing this problem?
portal.load().then(() => {
map.updateFrom(view).then(() => {
map
.saveAs({
title: nameInputRef.current.value,
portal: portal,
})
// Saved successfully
.then(function (item) {
// link to the newly-created web scene item
var itemPageUrl =
item.portal.url + "/home/item.html?id=" + item.id;
var link =
'<a target="_blank" href="' +
itemPageUrl +
'">' +
nameInputRef.current.value +
"</a>";
statusMessage(
"Save WebMap",
"<br> Successfully saved as <i>" + link + "</i>"
);
})
// Save didn't work correctly
.catch(function (error) {
statusMessage("Save WebMap", "<br> Error " + error);
});
});
});
}}