Any plans to allow loading KML/KMZ files without ArcGIS Online / Portal?

3030
4
12-15-2015 12:49 PM
JamesTruong
New Contributor II

Are there any plans to allow loading KML files that are not publicly accessible?

Sharing the KML file as a service to Server and Portal isn't a viable route I could use.

0 Kudos
4 Replies
ChrisSmith7
Frequent Contributor

Until they can push it off to the client, I would say no. It needs to be publicly accessible since the class actually makes a call to an Esri utility (you probably already know this):

http://utility.arcgis.com/sharing/kml

You may have also stumbled upon this thread:

Loading Dynamic KML from web service

I was thinking along the same lines as the OP in hosting the utility locally, or maybe creating the functionality locally. Esri said this wasn't possible, but technically, I think it should be...

0 Kudos
SteveCole
Frequent Contributor

Your other option, of course, is to parse the KML file and create a featureLayer on the fly. KML files are just XML anyways so, for simple KMLs of points (and possibly lines), this wouldn't be that difficult (albeit tedious).

0 Kudos
ChrisSmith7
Frequent Contributor

Maybe this would be a solution?

mapbox/togeojson · GitHub

Found it thanks to Jeff Jacobson in this thread -  Is there any way to add KML,KMZ and CSV file from local drive/folder in web app?

Oh, just as a plug for the Terrformer JSON parsing Jeff mentioned, I have a Runnable demo in case anyone is interested - http://code.runnable.com/Vfig_eplbl55NWA1/terraformer-demo-for-node-js

0 Kudos
JamesTruong
New Contributor II

Thanks.

I'm kinda of working on a parital workaround with

mapbox/togeojson · GitHub

Esri/geojson-layer-js · GitHub

Still haven't got it to work yet ... Problem with the data structure going through geojson layer.

Though I'm just feeding in the Object[] (features?) in the data

0 Kudos