Adding KML file hosted locally

2104
1
03-31-2019 11:57 PM
yockee
by
Occasional Contributor II

Hi,

I am creating an app using CMV as starting base. One of my operational layer is KML based. I want to call this KML file from within internal network. I don't want to host the KML file on outside premises.

I have read this doc : https://developers.arcgis.com/javascript/3/jsapi/kmllayer-amd.html.

And I find these lines :

"If your kml/kmz files are behind the firewall you will need to set the esriConfig.defaults.kmlService to your own utility service. (Requires Portal for ArcGIS)." And it advices me to use my own utility service :

require(["esri/config"], function(esriConfig) {
  esriConfig.defaults.kmlService = "http://www.example.com/arcgis/sharing/kml";
});

And.. I dont quite understand :

1. Which utility service ? Sharing Service ? Can't find such a service name

2. Where can I find this utility service within my local Geoportal ?

3. How to create such a service ?

4. Where can I set the esriConfig.defaults.kmlService" ? 

There is KML online sharing provided by esri : http://utility.arcgis.com/sharing/kml

I have Geoportal 10.6 hosted internally and its federated. I am using Web Adaptor. Also i m using Arcgis Server 10.6. IIS Web Server. 

Geoportal and Arcgis Server are working fine.

geoportal‌ #configurablemapviewer kml file‌ #cmv

Tags (2)
0 Kudos
1 Reply
AndresCastillo
MVP Regular Contributor

Hi @yockee ,

I believe the utility service is included as part of the standard deployment of ArcGIS Enterprise.

So, you can simply navigate to your specific portal url, like this:
https://<portal.domain.com>/<webadaptor>/sharing/kml

 

Also, in order to set the esriConfig.defaults.kmlService", you need to use the ArcGIS API for JavaScript, and require 

esri/layers/KMLLayer

 

0 Kudos