Hello,
I am having issues to load a map from my organization. In my first tests, I tried with maps from public account and have no problem. But now, with the organization account, when the screen to login appers, I can't use my organization account (only a public account) and, after login, I have an issue that I'm not able to see the map (issue expected, as I couldn't login using the organization account). The error is something like this:
dojo.js:310 [esri.WebMap] #load() Failed to load web map
- e {name: "webmap:load-portal-item", message: "Failed to load portal item", details: {…}}
- details:
- error: e
- details: {error: e, ssl: false}
- message: "You are currently signed in as: 'guilherme'. You do not have access to this resource: https://mydomain.maps.arcgis.com/sharing/rest/content/items/22cf203432584ed4b7d6189f952d6t80"
- name: "identity-manager:not-authorized"
- __proto__: b
- __proto__: Object
- message: "Failed to load portal item"
- name: "webmap:load-portal-item"
My code is:
[...]
<link rel="stylesheet" href="https://js.arcgis.com/4.9/esri/css/main.css">
<script src="https://js.arcgis.com/4.9/"></script>
<script src="http://code.jquery.com/jquery-3.3.1.min.js"></script>
<script>
require([
"esri/views/MapView",
"esri/WebMap",
"esri/config"
], function(MapView, WebMap, esriConfig) {
esriConfig.portalUrl = "https://mydomain.maps.arcgis.com";
var webmap = new WebMap({
portalItem: {
id: "22cf203432584ed4b7d6189f952d6t80",
type: "Web Mapping Application"
}
});
var view = new MapView({
map: webmap,
container: "viewDiv"
});
});
</script>
[...]
Any idea how to fix it? I'm trying to "redict the login" to my organization, but no idea if it is the right way to do it and even if it is possible!
Thank you in advance!