Select to view content in your preferred language

Layers don't show on arcgis online after saveAs() method of WebMap

969
0
06-30-2021 11:12 PM
RandyLiu6410
New Contributor

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?

RandyLiu6410_0-1625120056843.png

RandyLiu6410_1-1625120064792.png

 

 

            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);
                  });
              });
            });
          }}

 

 

0 Kudos
0 Replies