Always show all features in inspect mode

This commit is contained in:
Lukas Martinelli
2016-12-29 17:30:01 +01:00
parent 853361ace7
commit d16c3f4356
3 changed files with 10 additions and 10 deletions

View File

@@ -24,13 +24,14 @@ const Panel = (props) => {
}
function renderFeature(feature) {
console.log(feature)
return <div>
<Panel>{feature.layer['source-layer']}</Panel>
{renderProperties(feature)}
</div>
}
class FeatureLayerTable extends React.Component {
class FeaturePropertyPopup extends React.Component {
render() {
const features = this.props.features
@@ -41,4 +42,4 @@ class FeatureLayerTable extends React.Component {
}
export default FeatureLayerTable
export default FeaturePropertyPopup

View File

@@ -10,12 +10,10 @@ import 'mapbox-gl/dist/mapbox-gl.css'
import '../../mapboxgl.css'
function convertInspectStyle(mapStyle, sources, highlightedLayer) {
let coloredLayers = generateColoredLayers(sources)
const layer = colorHighlightedLayer(highlightedLayer)
const coloredLayers = generateColoredLayers(sources)
const layer = colorHighlightedLayer(highlightedLayer)
if(layer) {
const idx = style.indexOfLayer(coloredLayers, layer.id)
coloredLayers.splice(idx, 1)
coloredLayers.push(layer)
}