summaryrefslogtreecommitdiff
path: root/src/Map.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/Map.js')
-rw-r--r--src/Map.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/Map.js b/src/Map.js
new file mode 100644
index 0000000..78dbebf
--- /dev/null
+++ b/src/Map.js
@@ -0,0 +1,28 @@
+import React, { useState } from 'react';
+import ReactMapboxGl, { Layer, Feature } from 'react-mapbox-gl';
+import 'mapbox-gl/dist/mapbox-gl.css';
+
+const MAPBOX_ACCESS_TOKEN = 'pk.eyJ1IjoieXV2YWRtIiwiYSI6ImNpcnMxbzBuaTAwZWdoa25oczlzZmkwbHcifQ.UHtLngbKm9O8945pJm23Nw';
+
+const Mapbox = ReactMapboxGl({
+ accessToken: MAPBOX_ACCESS_TOKEN,
+ minZoom: 5,
+ maxZoom: 10,
+ hash: false,
+});
+
+function Map() {
+ const [center, setCenter] = useState([35, 31.9]);
+ const [zoom, setZoom] = useState([6.3]);
+
+ return (
+ <Mapbox style="mapbox://styles/mapbox/dark-v9" center={center} zoom={zoom}
+ containerStyle={{
+ height: '100vh',
+ width: '100vw'
+ }}
+ ></Mapbox>
+ );
+}
+
+export default Map;