Skip to content

Commit

Permalink
added google maps code
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenGrider committed Jan 23, 2017
1 parent a89a6b7 commit 1f24aae
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
2 changes: 1 addition & 1 deletion weather/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<link rel="stylesheet" href="style/style.css">
<link rel="stylesheet" href="https://cdn.rawgit.com/twbs/bootstrap/v4-dev/dist/css/bootstrap.css">
<link rel="stylesheet" href="https://cdn.rawgit.com/twbs/bootstrap/48938155eb24b4ccdde09426066869504c6dab3c/dist/css/bootstrap.min.css">
<script src="https://maps.googleapis.com/maps/api/js"></script>
</head>
<body>
Expand Down
19 changes: 19 additions & 0 deletions weather/src/components/google_map.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React, { Component } from 'react';

class GoogleMap extends Component {
componentDidMount() {
new google.maps.Map(this.refs.map, {
zoom: 12,
center: {
lat: this.props.lat,
lng: this.props.lon
}
});
}

render() {
return <div ref="map" />;
}
}

export default GoogleMap;
12 changes: 12 additions & 0 deletions weather/style/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
td, th {
vertical-align: middle !important;
text-align: center !important;
}

.input-group {
margin: 20px 0px;
}

svg {
height: 150px;
}

0 comments on commit 1f24aae

Please sign in to comment.