<LayerPanelLayersPage />

Constructor

# <LayerPanelLayersPage translations map tabIcon layerFilter enableFilter onFileImport handleFeatureDoubleClick handleLayerDoubleClick customActions shouldHideFeatures shouldAllowLayerRemoval onCreateHeatmap onExportFeatures onMergeLayers getMenuItemsForLayer disableDrag onLayerReorder onLayerRemoved disableHover setHoverStyle initialItemCount expandedHeight />

PropTypes:
Name Type Required Description Default
translations object No Object with key/value pairs for translated strings
map object No An Openlayer map from which the layer panel will derive its layers
tabIcon node No The icon for the page shown in the left side of the layer panel
layerFilter func No A function which takes in layers & returns a subset of those layers (useful to "hide" certain layers) (layers) => layers.filter(layer => !layer.get('_ol_kit_basemap') && layer.get('name') !== 'unselectable')
enableFilter bool No A boolean which turns on/off filtering of features in the layer panel page
onFileImport func No A callback function passed the features imported from 'kmz', 'kml', 'geojson', 'wkt', 'csv', 'zip', and 'json' file types
handleFeatureDoubleClick func No A callback function fired when a feature list item is double clicked () => {}
handleLayerDoubleClick func No A callback function fired when a feature list header is double clicked () => {}
customActions array No An array of components to be rendered in the LayerPanelHeader action menu
shouldHideFeatures func No A callback function to determine if a given layer's features should be kept hidden from the panel page display (layer) => false
shouldAllowLayerRemoval func No A callback function to determine if a given layer should be allowed to be removed from the panel page display (layer) => true
onCreateHeatmap func No A callback fired when a new heatmap is created () => {}
onExportFeatures func No A callback function that returns the file type and the features that are being exported
onMergeLayers func No A callback fired when layers are merged
getMenuItemsForLayer func No A callback function to set custom Menu Items for a specific layer. Should recieve an array of `@material-ui/core/MenuItem` () => false
disableDrag bool No A boolean to disable the drag event on the LayerPanelList
onLayerReorder func No A callback function to inform when layers are reordered
onLayerRemoved func No A callback function to inform when a layer is removed
disableHover bool No Truthy value will disable hover false
setHoverStyle func No Pass fill, stroke, and color hover style values () => ({ color: 'red', fill: '#ffffff', stroke: 'red' })
initialItemCount number No Set initial item count to render feature rows in virtualized list 6
expandedHeight number No Set max height for feature scroll area (number equates to pixels) 300
Since:
  • 0.5.0

View Source LayerPanel/LayerPanelLayersPage/index.js, line 54