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.
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...
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).
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
Thanks.
I'm kinda of working on a parital workaround with
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
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.