Skip to content

Commit

Permalink
altenrative google maps
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenGrider committed Jan 23, 2017
1 parent 1f24aae commit db44513
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion weather/src/containers/weather_list.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
import React, { Component } from 'react';
import { connect } from 'react-redux';
import Chart from '../components/chart';
import GoogleMap from '../components/google_map';

class WeatherList extends Component {
renderWeather(cityData) {
const name = cityData.city.name;
const temps = cityData.list.map(weather => weather.main.temp);
const pressures = cityData.list.map(weather => weather.main.pressure);
const humidities = cityData.list.map(weather => weather.main.humidity);
const { lon, lat } = cityData.city.coord;

return (
<tr key={name}>
<td>{name}</td>
<td><GoogleMap lon={lon} lat={lat} /></td>
<td><Chart data={temps} color="orange" units="K" /></td>
<td><Chart data={pressures} color="green" units="hPa" /></td>
<td><Chart data={humidities} color="black" units="%" /></td>
Expand Down
5 changes: 5 additions & 0 deletions weather/style/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ td, th {
svg {
height: 150px;
}

td:first-of-type, td:first-of-type > div {
height: 200px;
width: 250px;
}

0 comments on commit db44513

Please sign in to comment.