I have KML layer and I couldn't use it in KMLLayer module from JavaScript API. Is there any limitation or something else.?
From the documentation:
Known Limitations
- Currently, the KMLLayer is not supported in SceneView.
- MapImage is only supported when the MapView's spatial reference is WGS84 (wkid: 4326).
- More information can be found here about limitations using KML layers.
Also,
The KMLLayer uses a utility service from ArcGIS.com, therefore your kml/kmz files must be publicly accessible on the internet. If the kml/kmz files are behind a firewall you must to set the esriConfig.kmlServiceUrl to your own utility service (requires ArcGIS Enterprise).