Skip to main content

GroupLayer

Introduction

The GroupLayer component is used to organize and group other layers together. It can contain multiple layer components as children:

import React from "react";
import { GroupLayer, FeatureLayer, MapImageLayer, MapView } from "esrieact";

export const ReactMap: React.FC = () => {
return (
<MapView>
<GroupLayer title="Environmental Data">
<FeatureLayer url="https://services.arcgis.com/example/FeatureServer/0" />
<MapImageLayer url="https://services.arcgis.com/example/MapServer" />
</GroupLayer>
</MapView>
);
};

Props

Props extends GroupLayer properties

children

Children components can be any of the following esrieact components:

  • Any layer component (FeatureLayer, MapImageLayer, GraphicsLayer, etc.)
  • Another GroupLayer component
  • LayerView component

events

LayerEventHandlerFnMap: A standard event handler function map for all layer components

  "layerview-create": __esri.LayerLayerviewCreateEventHandler;
"layerview-create-error": __esri.LayerLayerviewCreateErrorEventHandler;
"layerview-destroy": __esri.LayerLayerviewDestroyEventHandler;