Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Centered the icons #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions public/citybike.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico" />
<link rel="shortcut icon" href="citybike.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
Expand All @@ -24,7 +24,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<title>30 minutes</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
21 changes: 15 additions & 6 deletions src/ThirtyMinutesMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ const windowSizing = () => ({

class ThirtyMinutesMap extends React.Component {

/*constructor(props) {
super(props);
this.state = {
circleposition: null
};
this.onStationClick = this.onStationClick.bind(this);
}*/

componentDidMount() {
console.log("Map get mounted");
}
Expand All @@ -27,17 +35,18 @@ class ThirtyMinutesMap extends React.Component {
}
}

onStationClick(e) {
// center circle on clicked station
// do some magic to define the paths etc.....
}
/*onStationClick(e) {
this.setState({
circleposition: [this.props.lat, this.props.lng]
});
}*/

render() {
// @todo: somewhere else
const stationMarker = Leaflet.icon({
iconUrl: stationIcon,
iconSize: [38, 95],
iconAnchor: [22, 94],
iconSize: [35, 35],
iconAnchor: [15.5, 15.5],
popupAnchor: [-3, -76],
shadowSize: [68, 95],
shadowAnchor: [22, 94]
Expand Down