Ist es möglich, den Web Map Viewer in eine benutzerdefinierte Web-App einzubetten und Nutzern zu ermöglichen, Webkarten zu erstellen?
Ich würde gerne etwas Ähnliches umsetzen wie das, was man mit verschiedenen Story Maps machen kann (z. B. Journal, Cascade usw.), etwa so:

Wie Sie sehen können, ist der Viewer eingebettet, und außerhalb befindet sich eine „Speichern“-Schaltfläche (aus irgendeinem Grund ist die standardmäßige Speichern-Schaltfläche nicht vorhanden, wenn der Viewer eingebettet wird).
Also habe ich den Quellcode von storymap-journal heruntergeladen und versucht, dasselbe lokal zu machen. Dabei erhielt ich diese Meldung:

Das war beunruhigend. Warum ist das so? Soll damit ein Problem mit Cookies vermieden werden?
Um herauszufinden, wie die Schaltfläche „Speichern“ implementiert ist, öffnete ich die Konsole und sah eine Debug-Meldung, als ich darauf klickte. Dann überprüfte ich den Quellcode und fand die Funktion, die in der Datei MapViewerWrapper.js aufgerufen wird:
<SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">.</SPAN>send <SPAN class="operator token">=</SPAN> <SPAN class="keyword token">function</SPAN><SPAN class="punctuation token">(</SPAN>json<SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
console<SPAN class="punctuation token">.</SPAN><SPAN class="token function">log</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">„MV sending“</SPAN><SPAN class="punctuation token">,</SPAN> json<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="keyword token">try</SPAN> <SPAN class="punctuation token">{</SPAN>
params<SPAN class="punctuation token">.</SPAN>frameWindow<SPAN class="punctuation token">.</SPAN><SPAN class="token function">postMessage</SPAN><SPAN class="punctuation token">(</SPAN>JSON<SPAN class="punctuation token">.</SPAN><SPAN class="token function">stringify</SPAN><SPAN class="punctuation token">(</SPAN>json<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">,</SPAN> MapViewerWrapperUtils<SPAN class="punctuation token">.</SPAN><SPAN class="token function">getPortalURL</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN> <SPAN class="keyword token">catch</SPAN> <SPAN class="punctuation token">(</SPAN> error <SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN>
<SPAN class="comment token">// Dies scheint nicht aufgerufen zu werden, da der Fehler im Frame auftreten würde</SPAN>
params<SPAN class="punctuation token">.</SPAN><SPAN class="token function">onError</SPAN><SPAN class="punctuation token">(</SPAN>error <SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">;</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>Beim Debuggen habe ich das „json“-Objekt überprüft. Es enthält etwa Folgendes:
<SPAN class="punctuation token">{</SPAN>type<SPAN class="punctuation token">:</SPAN> <SPAN class="string token">„hasUnsavedChanges“</SPAN><SPAN class="punctuation token">}</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN></SPAN>Und „MapViewerWrapperUtils.getPortalURL()“ gibt Folgendes zurück:
<SPAN class="string token"><SPAN>„</SPAN><A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fhhkaos.maps.arcgis.com" target="_blank">http://hhkaos.maps.arcgis.com</A><SPAN>“</SPAN></SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN></SPAN>
Ich glaube nicht, dass es sich um ein domainübergreifendes Problem mit postMessage handelt, oder?
Ich wollte also nur fragen, ob jemand von euch schon einmal versucht hat, das umzusetzen, was ich vorhabe, oder einfach weiß, ob es möglich ist.
Vielen Dank im Voraus,
Raul
P. S.: Ich habe es vor zwei Jahren versucht, als die „Speichern“-Schaltfläche noch im iframe war. Ich glaube aber, sie wurde mit einem Update von ArcGIS Online entfernt.