AnsweredAssumed Answered

Adding a webmap from Arcgis Enterprise

Question asked by MohamadMousheimish on Mar 29, 2020
Latest reply on Mar 30, 2020 by krank42

I'm trying to add a webmap from an arcgis enterprise portal. I followed the tutorials on esri WebMap API with the following link: WebMap API Reference


I'm getting the following error: Invalid portal item type 'Web Mapping Application', expected 'Web Map'

You can see in the code that I've already specified the type of the portal Item to 'Web Map'


Any Idea about what's happening?


Here's how I'm adding the Webmap:


  async SetWebMap() {
    const [WebMapMapViewEsriConfigPortalItem] = await loadModules(["esri/WebMap""esri/views/MapView""esri/config""esri/portal/PortalItem"]);
    EsriConfig.portalUrl = portalUrl;
    var portalItem = new PortalItem({
      id: "XXXXXXXX",
      type: "Web Map",
    var webmap = new WebMap({
      portalItem: portalItem
    var view = new MapView({
      map: webmap,
      container: "mapViewNode"