Skip to content

Commit 66dd1ad

Browse files
authored
Merge pull request #40 from CodeForPhilly/buttons
Added buttons below map
2 parents 3ccb959 + 2ad3851 commit 66dd1ad

4 files changed

Lines changed: 40 additions & 15 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to release number versioning.
1313
- Added Docker containers with docker-compose [#10](https://github.com/CodeForPhilly/third-places/pull/10)
1414
- Set up Leaflet React component and boiletplate homepage[#7](https://github.com/CodeForPhilly/third-places/issues/7)
1515
- Added initial Django models & migration [#21](https://github.com/CodeForPhilly/third-places/pull/21)
16+
- Added buttons at bottom of Map [#40](https://github.com/CodeForPhilly/third-places/pull/40)
1617

1718
### Changed
1819
- Made Leaflet map element fullscreen and rmeoved title[#27](https://github.com/CodeForPhilly/third-places/issues/27)

src/app/src/App.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import './App.css'
22
import Map from './Map/Map'
33

44

5-
65
function App() {
76

87
return (

src/app/src/Map/Map.css

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
1+
.leaflet-container-wrapper {
2+
display: flex;
3+
flex-flow: column nowrap;
4+
height: 100vh;
5+
}
6+
17
.leaflet-container {
28
width: 100vw;
3-
height: 100vh;
9+
height: 100%;
10+
flex-grow: 1;
11+
}
12+
13+
.button-container {
14+
display: flex;
15+
flex-flow: row nowrap;
16+
justify-content: center;
17+
z-index: 1000;
18+
width: 100vw;
19+
padding: 1rem 0;
20+
background-color: white;
421
}

src/app/src/Map/Map.tsx

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,32 @@
11
import './Map.css'
22
import { MapContainer, TileLayer, Marker, Popup } from 'react-leaflet'
33
import 'leaflet/dist/leaflet.css'
4+
import Button from 'react-bootstrap/Button';
45

56

67
function Map() {
7-
8+
const buttonStyle = {backgroundColor:"#ADD8E6", marginLeft: '1rem', marginRight: '1rem'}
89
return (
9-
<div className="leaflet-container">
10-
<MapContainer center={[39.952584, -75.165222]} zoom={13} scrollWheelZoom={true}>
11-
<TileLayer
12-
attribution='&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
13-
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
14-
/>
15-
<Marker position={[39.952584, -75.165222]}>
16-
<Popup>
17-
This spots got a good vibe
18-
</Popup>
19-
</Marker>
20-
</MapContainer>
10+
<div className="leaflet-container-wrapper">
11+
<div className="leaflet-container">
12+
<MapContainer center={[39.952584, -75.165222]} zoom={13} scrollWheelZoom={true}>
13+
<TileLayer
14+
attribution='&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
15+
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
16+
/>
17+
<Marker position={[39.952584, -75.165222]}>
18+
<Popup>
19+
This spots got a good vibe
20+
</Popup>
21+
</Marker>
22+
</MapContainer>
23+
</div>
24+
<div className="button-container">
25+
<Button style={buttonStyle} variant="primary">Near Me</Button>
26+
<Button style={buttonStyle} variant="primary">On the Way To</Button>
27+
<Button style={buttonStyle} variant="primary">Around Destination</Button>
2128
</div>
29+
</div>
2230
)
2331
}
2432

0 commit comments

Comments
 (0)