diff --git a/src/components/App.jsx b/src/components/App.jsx index 45d604d..d02d62e 100644 --- a/src/components/App.jsx +++ b/src/components/App.jsx @@ -110,20 +110,6 @@ export default class App extends React.Component { this.onLayersChange(changedLayers) } - changeHighlightedLayer(highlight) { - const metadata = this.state.mapStyle.metadata || {} - const layers = this.state.mapStyle.layers - const highlightedLayer = highlight ? layers[this.state.selectedLayerIndex].id : null - - const changedStyle = { - ...this.state.mapStyle, - metadata: { - 'maputnik:highlighted_layer': highlightedLayer - } - } - this.onStyleChanged(changedStyle) - } - onLayerChanged(layer) { const changedLayers = this.state.mapStyle.layers.slice(0) const idx = style.indexOfLayer(changedLayers, layer.id) @@ -188,10 +174,8 @@ export default class App extends React.Component { layer={selectedLayer} sources={this.state.sources} vectorLayers={this.state.vectorLayers} - highlightLayer={metadata['maputnik:highlighted_layer'] ? true : false} onLayerChanged={this.onLayerChanged.bind(this)} onLayerIdChange={this.onLayerIdChange.bind(this)} - onHighlightLayerChange={this.changeHighlightedLayer.bind(this)} /> : null return this.changeProperty(null, 'source-layer', v)} /> - - this.props.onHighlightLayerChange(v === "highlight")} - /> - case 'properties': return