diff --git a/src/client/components/Deck.js b/src/client/components/Deck.js index cd2a4ec43612de7e425c6a29122d8dccf022f031..34dc8a76a2365e78e3d31f14bcb13d8eb97cd7e6 100644 --- a/src/client/components/Deck.js +++ b/src/client/components/Deck.js @@ -24,6 +24,9 @@ import Typography from '@material-ui/core/Typography'; const MAPBOX_ACCESS_TOKEN = 'pk.eyJ1IjoiZWtrb25lbiIsImEiOiJjam5vampzZ28xd2dyM3BzNXR0Zzg4azl4In0.eozyF-bBaZbA3ibhvJlJpQ'; const styles = theme => ({ + mapGLContainer: { + marginTop: 72 + }, tooltip: { position: 'absolute', padding: '4px', @@ -195,8 +198,10 @@ class Deck extends React.Component { return ( <ReactMapGL {...this.state.viewport} + className={this.props.classes.root} width='100%' - height='100%' + height='calc(100% - 72px)' + style={{marginTop: 72}} onViewportChange={this._onViewportChange} mapboxApiAccessToken={MAPBOX_ACCESS_TOKEN} > @@ -205,7 +210,6 @@ class Deck extends React.Component { viewState={this.state.viewport} layers={[layer]} /> - <div className={this.props.classes.mapControls}> <NavigationControl onViewportChange={this._onViewportChange} /> </div> @@ -216,7 +220,6 @@ class Deck extends React.Component { onClose={this.closeDialog.bind(this)} data={this.state.dialog.data} /> - </ReactMapGL> ); } diff --git a/src/client/components/LeafletMap.js b/src/client/components/LeafletMap.js index 781ec5533b3029d51d8f12094b9b7408f62fa2ec..5f361a5eb10403077324e5d243ed95c40fdf39d1 100644 --- a/src/client/components/LeafletMap.js +++ b/src/client/components/LeafletMap.js @@ -46,8 +46,6 @@ const style = { class LeafletMap extends React.Component { componentDidMount() { - console.log('mounted') - //this.props.fetchManuscripts(); this.props.fetchPlaces('creationPlaces'); // Base layers @@ -55,19 +53,7 @@ class LeafletMap extends React.Component { attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors' }); - // const karelianMaps = L.tileLayer('http:///mapwarper.onki.fi/mosaics/tile/4/{z}/{x}/{y}.png', { - // attribution: 'SeCo' - // }); - // - // const senateAtlas = L.tileLayer('http:///mapwarper.onki.fi/mosaics/tile/5/{z}/{x}/{y}.png', { - // attribution: 'SeCo' - // }); - // - // const westernFront = L.tileLayer('http://mapwarper.net/mosaics/tile/844/{z}/{x}/{y}.png', { - // attribution: 'SeCo' - // }); - - const test = L.tileLayer('http://mapwarper.net/maps/tile/28345/{z}/{x}/{y}.png', { + const parisTest = L.tileLayer('http://mapwarper.net/maps/tile/28345/{z}/{x}/{y}.png', { attribution: 'SeCo' }); @@ -103,7 +89,7 @@ class LeafletMap extends React.Component { // 'Search results': this.resultMarkerLayer, // 'Karelian maps (MapWarper)': karelianMaps, // 'Senate atlas (MapWarper)': senateAtlas, - 'Paris': test + 'Paris': parisTest }; this.layerControl = L.control.layers( @@ -266,7 +252,6 @@ class LeafletMap extends React.Component { LeafletMap.propTypes = { fetchPlaces: PropTypes.func.isRequired, fetchPlace: PropTypes.func.isRequired, - fetchManuscripts: PropTypes.func.isRequired, results: PropTypes.array.isRequired, mapMode: PropTypes.string.isRequired }; diff --git a/src/client/components/Manuscripts.js b/src/client/components/Manuscripts.js index 442d4921a3d085748f3ceb965fb01a91bde14b9d..e4982e5bef2568bb36420f072706fe85dc5d662c 100644 --- a/src/client/components/Manuscripts.js +++ b/src/client/components/Manuscripts.js @@ -4,6 +4,8 @@ import { Route, Switch } from 'react-router-dom'; import ViewTabs from './ViewTabs'; import ResultTable from './ResultTable'; import LeafletMap from './LeafletMap'; +import Deck from './Deck'; +import Pie from './Pie'; let Manuscripts = props => { return ( @@ -30,11 +32,28 @@ let Manuscripts = props => { <LeafletMap fetchPlaces={props.fetchPlaces} fetchPlace={props.fetchPlace} - fetchManuscripts={props.fetchManuscripts} results={props.search.places} mapMode='cluster' />} /> + <Route + path={props.match.url + '/migrations'} + render={() => + <Deck + fetchPlaces={props.fetchPlaces} + fetchingPlaces={props.search.fetchingPlaces} + data={props.search.places} + />} + /> + <Route + path={props.match.url + '/statistics'} + render={() => + <Pie + fetchPlaces={props.fetchPlaces} + fetchingPlaces={props.search.fetchingPlaces} + data={props.search.places} + />} + /> </Switch> </React.Fragment> ); diff --git a/src/client/components/ViewTabs.js b/src/client/components/ViewTabs.js index e2eace3554565e6f0540269c085875076ef4c4b4..a502792410868eb516bf3ea564427cc67e9cb9b4 100644 --- a/src/client/components/ViewTabs.js +++ b/src/client/components/ViewTabs.js @@ -43,7 +43,7 @@ class ViewTabs extends React.Component { > <Tab icon={<CalendarViewDayIcon />} label="table" component={Link} to="/manuscripts/table" /> <Tab icon={<AddLocationIcon />} label="creation places" component={Link} to="/manuscripts/creation_places" /> - <Tab icon={<RedoIcon />} label="migrations" /> + <Tab icon={<RedoIcon />} label="migrations" component={Link} to="/manuscripts/migrations" /> <Tab icon={<PieChartIcon />} label="statistics" /> </Tabs> </Paper> diff --git a/src/client/containers/MapApp.js b/src/client/containers/MapApp.js index 16a5e9eba4bf465e0fa8768f8cea304f5ee07273..5cde7cbb20668be7ba8cc3dd2ae7a125da32bf75 100644 --- a/src/client/containers/MapApp.js +++ b/src/client/containers/MapApp.js @@ -117,10 +117,10 @@ let MapApp = (props) => { </Switch> </div> <Paper className={classes.footer}> - <img className={classes.oxfordLogo} src='img/logos/oxford-logo-white.png' alt='Oxford University logo'/> + {/*<img className={classes.oxfordLogo} src='img/logos/oxford-logo-white.png' alt='Oxford University logo'/> <img className={classes.pennLogo} src='img/logos/penn-logo-white.png' alt='Oxford University logo'/> <img className={classes.cnrsLogo} src='img/logos/cnrs-logo-white-small.png' alt='CNRS logo'/> - <img className={classes.aaltoLogo} src='img/logos/aalto-logo-white-no-background-small.png' alt='Aalto University logo'/> + <img className={classes.aaltoLogo} src='img/logos/aalto-logo-white-no-background-small.png' alt='Aalto University logo'/>*/} </Paper> </div> </div> diff --git a/src/server/sparql/Datasets.js b/src/server/sparql/Datasets.js index cd5e8bb338e0fd8abc646c6da7db6b1e877dc4d1..86b3a5d0db5eb788035b13bc98f752341fed52ef 100644 --- a/src/server/sparql/Datasets.js +++ b/src/server/sparql/Datasets.js @@ -14,8 +14,8 @@ module.exports = { 'title': 'MMM', 'shortTitle': 'MMM', 'timePeriod': '', - 'endpoint': 'http://ldf.fi/mmm-cidoc/sparql', - //'endpoint': 'http://localhost:3050/ds/sparql', + //'endpoint': 'http://ldf.fi/mmm-cidoc/sparql', + 'endpoint': 'http://localhost:3050/ds/sparql', 'countQuery': ` PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> diff --git a/webpack.client.dev.js b/webpack.client.dev.js index 819680a2bad35a21e6b93286085598209ce3a98a..ab249532a1c0034014634d4d730e6461385ff68f 100644 --- a/webpack.client.dev.js +++ b/webpack.client.dev.js @@ -11,6 +11,6 @@ module.exports = merge(common, { open: true, historyApiFallback: true, publicPath: '/', - contentBase: path.join(__dirname, 'dist/public') + //contentBase: path.join(__dirname, 'dist/public') } });