How to clear leaflet map in reactjs by button?
问题 I want to clear my leaflet map by clicking a button...how to do this... I want to clear all drawed shapes on the map, so the map to be clear This is my code of the leaflet map in the return statement: <Map key={this.state.keyMAP} style={{ height: "50vh" }} center={position} zoom={13} onClick={this.handleClick} onCreate={this.onCreate} onLocationfound={this.handleLocationFound} > {/* startDirectly */} <TileLayer attribution='© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'