KMLLayer
Introduction
The KMLLayer
is used to display KML (Keyhole Markup Language) data on a map. KML is an XML-based format for displaying geographic data in applications like Google Earth. The KMLLayer can be declared alone or with child components to customize its behavior:
import React from "react";
import { KMLLayer, MapView } from "esrieact";
const KML_URL = "https://developers.arcgis.com/javascript/latest/sample-code/layers-kml/live/kml/Sample.kml";
export const ReactMap: React.FC = () => {
return (
<MapView>
<KMLLayer url={KML_URL} />
</MapView>
);
};
Props
Props
extends KMLLayer properties
children
Children components can be any of the following esrieact components:
events
Standard events on an __esri.Layer
:
"layerview-create": __esri.LayerLayerviewCreateEventHandler;
"layerview-create-error": __esri.LayerLayerviewCreateErrorEventHandler;
"layerview-destroy": __esri.LayerLayerviewDestroyEventHandler;