Clickable layer tooltips (#60)

This commit is contained in:
Grzegorz Wolański
2018-01-08 22:18:30 +01:00
parent 6e86c60f89
commit 6a6595d971
6 changed files with 16 additions and 11 deletions
+4
View File
@@ -16,6 +16,7 @@ function groupFeaturesBySourceLayer(features) {
class FeatureLayerPopup extends React.Component {
static propTypes = {
onLayerSelect: PropTypes.func.isRequired,
features: PropTypes.array
}
@@ -27,6 +28,9 @@ class FeatureLayerPopup extends React.Component {
return <label
key={idx}
className="maputnik-popup-layer"
onClick={() => {
this.props.onLayerSelect(feature.layer.id)
}}
>
<LayerIcon type={feature.layer.type} style={{
width: 14,