<LayerPanelLayersPage />

Constructor

# <LayerPanelLayersPage translations map tabIcon layerFilter enableFilter onFeaturesImport handleFeatureDoubleClick handleLayerDoubleClick customActions shouldHideFeatures shouldAllowLayerRemoval onExportFeatures getMenuItemsForLayer onFileImport disableDrag />

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
onFeaturesImport 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
onExportFeatures func No A callback function that returns the file type and the features that are being exported
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
onFileImport func No A callback function passed the features imported from 'kmz', 'kml', 'geojson', 'wkt', 'csv', 'zip', and 'json' file types
disableDrag bool No A boolean to disable the drag event on the LayerPanelList
Since:
  • 0.5.0

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