• Creates a layer to visualize a KMLGroundOverlayFeature.

     export function createKMLLayer(groundOverlay: KMLGroundOverlayFeature, map: Map) {
    if ( !groundOverlay.shape?.bounds ||
    !groundOverlay.properties.icon?.href) {
    return;
    }

    createGroundOverlayLayer(map, groundOverlay).then(layer => {
    // Add the layer to the map
    map.layerTree.addChild(layer);
    });

    By default, this function will use the KMLFeatureProperties.name as the layer's label and KMLFeatureProperties.visibility as the layer's visible flag. You can override this default behavior by specifying a label or visible flag in the layerOptions.

    Parameters

    Returns Promise<Layer>

    Since

    2021.0