-
Notifications
You must be signed in to change notification settings - Fork 1
/
Map.js
44 lines (40 loc) · 1.01 KB
/
Map.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import React, { useState, useEffect } from "react";
import MapView, { Polygon } from "react-native-maps";
import { StyleSheet, View } from "react-native";
import { SafeAreaView } from "react-native-safe-area-context";
import { buildingList } from "./BuildingFunctions";
export default function Map() {
// Georgia Tech Coordinates
const init_reg = {
latitude: 33.7756,
longitude: -84.3963,
latitudeDelta: 0.029,
longitudeDelta: 0.015,
};
return (
<SafeAreaView style={styles.container}>
<MapView
style={styles.map}
showsUserLocation={true}
followsUserLocation={true}
initialRegion={init_reg}
>
{buildingList.map((building) => {
<Polygon
fillColor={"rgba(173,216,230,0.5)"}
coordinates={building.getPolygonCoordinates()}
></Polygon>
})}
</MapView>
</SafeAreaView>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
},
map: {
width: "100%",
height: "100%",
},
});