Download pool/shard005/JavaScript/0031271_MapContainer.js from Variable-role/sajaniemi_variable_dataset_large: direct link, hf CLI and curl.
- Browser
- Download file 942 Bytes
-
https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard005/JavaScript/0031271_MapContainer.js
- Command line
-
hf download hf://datasets/Variable-role/sajaniemi_variable_dataset_large/pool/shard005/JavaScript/0031271_MapContainer.js
-
curl -L -o 0031271_MapContainer.js https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard005/JavaScript/0031271_MapContainer.js
942 Bytes
| import {connect} from 'react-redux' | |
| import Map from './Map' | |
| import {newGeometry, removeGeometry} from '../../actions/SearchParamActions' | |
| import { | |
| clearCollections, | |
| triggerSearch, | |
| } from '../../actions/SearchRequestActions' | |
| import {showCollections} from '../../actions/FlowActions' | |
| import {withRouter} from 'react-router' | |
| const mapStateToProps = state => { | |
| const {geoJSON} = state.behavior.search | |
| return { | |
| geoJsonSelection: geoJSON, | |
| showMap: state.ui.layout.showMap, | |
| } | |
| } | |
| const mapDispatchToProps = (dispatch, ownProps) => { | |
| return { | |
| handleNewGeometry: geoJSON => dispatch(newGeometry(geoJSON)), | |
| removeGeometry: () => dispatch(removeGeometry()), | |
| submit: () => { | |
| dispatch(clearCollections()) | |
| dispatch(triggerSearch()) | |
| dispatch(showCollections(ownProps.history)) | |
| }, | |
| } | |
| } | |
| const MapContainer = withRouter( | |
| connect(mapStateToProps, mapDispatchToProps)(Map) | |
| ) | |
| export default MapContainer | |