I have web maps created in Portal for ArcGIS and are shared within the organization. I am trying to bring those maps into my app using ArcGIS API for JavaScript. When I use the unique web map id, the map does not show up. However, if I use the map id of a map created in ArcGIS Online, the map shows up.
require([
"esri/views/MapView",
"esri/WebMap",
"dojo/on",
"dojo/domReady!"
], function(
MapView, WebMap,
on
) {
var webmapids = [
"f2777e16f8734dc19321558bde5b26ba",
"71ba2a96c368452bb73d54eadbd59faa",
"45ded9b3e0e145139cc433b503a8f5ab"
];
/************************************************************
* Create multiple WebMap instances
************************************************************/
var webmaps = webmapids.map(function(webmapid) {
return new WebMap({
portalItem: {
id: webmapid
}
});
});