Display of KML file in esri javascript from file object

838
4
Jump to solution
01-24-2023 02:26 AM
Vinay_Kumar
New Contributor

I need to read the KML file from the File Object and show it on the map

0 Kudos
1 Solution

Accepted Solutions
Raul_Jimenez
Esri Contributor
4 Replies
Raul_Jimenez
Esri Contributor

@Vinay_Kumar please provide more info. You are writing the the ArcGIS REST JS forum, are you using this technology? This is mainly to access ArcGIS REST/web services. 

What is the File Object? Is it the KML? It is hosted in ArcGIS?

Please share as much information as you can (to help us to help you) 😉.

0 Kudos
Vinay_Kumar
New Contributor

Like User will upload the KML file we need to display on the ArcGIS REST JS Map. It was not hosted in ArcGIS. Is there an alternative without hosting? 

0 Kudos
Raul_Jimenez
Esri Contributor

I think you are talking about the ArcGIS Maps SDK for JS and not ArcGIS REST JS, are you?

If that's the case, the Maps SDK which is for client-side applications (UI) with maps have a KMLLayer class you can use to load data from an external source.

0 Kudos
Raul_Jimenez
Esri Contributor

I moved the conversation to the right forum: https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/re-display-of-kml-file-in-esri-ja...

Sorry for the inconveniences.