import React from 'react' import InputBlock from '../inputs/InputBlock' import StringInput from '../inputs/StringInput' import LayerIcon from '../icons/LayerIcon' import input from '../../config/input' import colors from '../../config/colors' import { margins, fontSizes } from '../../config/scales' const Panel = (props) => { return
{props.children}
} function renderFeature(feature) { return
{feature.layer['source-layer']}
} function groupFeaturesBySourceLayer(features) { const sources = {} features.forEach(feature => { sources[feature.layer['source-layer']] = sources[feature.layer['source-layer']] || [] sources[feature.layer['source-layer']].push(feature) }) return sources } class FeatureLayerPopup extends React.Component { render() { const sources = groupFeaturesBySourceLayer(this.props.features) const items = Object.keys(sources).map(vectorLayerId => { const layers = sources[vectorLayerId].map((feature, idx) => { return }) return
{vectorLayerId} {layers}
}) return
{items}
} } export default FeatureLayerPopup