summaryrefslogtreecommitdiff
path: root/src/Map.js
diff options
context:
space:
mode:
authorYuval Adam <_@yuv.al>2022-08-29 10:24:51 +0300
committerYuval Adam <_@yuv.al>2022-08-29 10:24:51 +0300
commit44a1c5b7e62e83af4d670e011f5998b9b8aedfef (patch)
tree4ad1299c0f5ba83a6d7783bdc0d6d649c037072b /src/Map.js
parent5e346930cb9e0672e15fbda4621a9b72e8b072e4 (diff)
Update all .tsx files and remove unused
Diffstat (limited to 'src/Map.js')
-rw-r--r--src/Map.js65
1 files changed, 0 insertions, 65 deletions
diff --git a/src/Map.js b/src/Map.js
deleted file mode 100644
index c39e1ac..0000000
--- a/src/Map.js
+++ /dev/null
@@ -1,65 +0,0 @@
-import React, { Fragment, useState } from "react";
-import ReactMapboxGl, { Layer, Source } from "react-mapbox-gl";
-
-import {
- MAPBOX_ACCESS_TOKEN,
- IMAGE_COORDINATES,
- IMAGES_BASE_URL
-} from "./config";
-
-import "mapbox-gl/dist/mapbox-gl.css";
-
-const Mapbox = ReactMapboxGl({
- accessToken: MAPBOX_ACCESS_TOKEN,
- minZoom: 5,
- maxZoom: 10,
- hash: false
-});
-
-function Map(props) {
- const [center] = useState([35, 31.9]);
- const [zoom] = useState([6.3]);
-
- return (
- <Mapbox
- style="mapbox://styles/mapbox/dark-v9"
- center={center}
- zoom={zoom}
- containerStyle={{
- height: "100vh",
- width: "100vw"
- }}
- >
- {props.images.map((img, i) => {
- const id = `radar-280-${i}`;
- return (
- <Fragment key={`image-${id}`}>
- <Source
- id={id}
- key={`source-${id}`}
- tileJsonSource={{
- type: "image",
- url: `${IMAGES_BASE_URL}/${img}`,
- coordinates: IMAGE_COORDINATES
- }}
- />
- <Layer
- id={id}
- key={`layer-${id}`}
- sourceId={id}
- type="raster"
- paint={{
- "raster-opacity": i === props.slider ? 0.85 : 0,
- "raster-opacity-transition": {
- duration: 0
- }
- }}
- />
- </Fragment>
- );
- })}
- </Mapbox>
- );
-}
-
-export default Map;