AnsweredAssumed Answered

Can I use createMap using itemID for a WebMap hosted in Portal for ArcGIS?

Question asked by vandervoort on Dec 2, 2015

For a variety of reasons, we'd like to host our webmaps on-premise using Portal for ArcGIS Server instead of ArcGIS Online. That means the content of the webmap has to be consumable by a JSAPI application by its JSON. Also exposed is its webmap ID. esri/arcgis/utils | API Reference | ArcGIS API for JavaScript  indicates that createMap can use an itemID (if hosted at AGOL) or itemData - which will be the JSON that can be embedded in the application - e.g., in a configuration.

 

We have a highly customized JSAPI application - its functionality cannot be recreated using the WAB or any of the templates.

 

Our problem is that our webmaps change quite frequently - it's impractical to export the webmap into JSON and put the JSON into a configuration every time the webmap changes. At the same time, the JSAPI application can only use createMap with an itemID if the webmap is hosted at AGOL.

 

Is there some special magic I can use to consume a locally-host webmap by its itemID? For example, if I knew the URL of the webmap, can I tease the configuration JSON out of it and use that to hydrate the map in the JSAPI app? Just an idea...

 

Discuss...

 

BTW JSAPI 3.x and we won't refactor a release in 4.x until it's been in production for at least a year.

 

TIA

Outcomes