ArcGIS Portal KML File not found. Wrong url or out of memory

841
5
06-09-2021 11:37 AM
RYANCARL
New Contributor III

Just need a little help to understand why this is happening and if there is a solution someone has found to resolve this issue.

Currently I am running the ArcGIS Enterprise 10.8.1 software and want to build a Web Map that will then be rendered using the ArcGIS JS API. When I load a KML file into the ArcGIS Portal it loads without an issue allowing me to open that data inside a the Map Viewer.

The error that I am getting is "File not found. Wrong url or out of memory." and the error occurs when I save that data to a Web Map and attempt to load that web map with the ArcGIS JS API.  Using the following code:

      esriConfig.portalUrl = "https://xxxxxx/portal";
const portal = new Portal();
const webmap = new WebMap({
portalItem: {
id: "xxxxxxxxxxxxxxxxxxxxxxxx"
}
});

const view = new MapView({
container: mapDiv.current,
map: webmap
});

 Attached is an image of the error.

Any help will be greatly appreciated. 

0 Kudos
5 Replies
ReneRubalcava
Frequent Contributor II

I'm not familiar with the error, but to rule it out, is your arcgis server accessible externally? Maybe arcgis.com can't see it. 

0 Kudos
RYANCARL
New Contributor III

Hi @ReneRubalcava ,

Sorry I didn't respond to this sooner I didn't see the response until just now. 

The ArcGIS Enterprise system is in a very secure network does it need to be able to talk to arcgis.com for the KMLs to work correctly? 

0 Kudos
ReneRubalcava
Frequent Contributor II

By default, yes, it uses the KML utility service on arcgis,.com.

You can change it here

https://developers.arcgis.com/javascript/latest/api-reference/esri-config.html#kmlServiceUrl

To point it to your enterprise server.

0 Kudos
RYANCARL
New Contributor III

@ReneRubalcava thanks for pointing that out to me. Would you know if it is possible to make that configuration work with the Experience Builder? The team I am working on has determined that that will be their preferred method of development 

0 Kudos
ReneRubalcava
Frequent Contributor II

I'm not fully up to date on Experience Builder, but looking at this sample, looks like you can do it right in the widget.

https://github.com/Esri/arcgis-experience-builder-sdk-resources/blob/master/samples/widgets/view-lay...

0 Kudos