Skip to content

Commit 18f5d76

Browse files
authored
Added local json file to use OpenStreetMap tile server (#67)
EPICSYSTEM-85
1 parent 3008078 commit 18f5d76

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed

met-web/public/basic-map.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"version": 8,
3+
"name": "Basic World Map",
4+
"sources": {
5+
"simple-tiles": {
6+
"type": "raster",
7+
"tiles": [
8+
"https://a.tile.openstreetmap.org/{z}/{x}/{y}.png",
9+
"https://b.tile.openstreetmap.org/{z}/{x}/{y}.png",
10+
"https://c.tile.openstreetmap.org/{z}/{x}/{y}.png"
11+
],
12+
"tileSize": 256,
13+
"attribution": "Map data © OpenStreetMap contributors"
14+
}
15+
},
16+
"layers": [
17+
{
18+
"id": "simple-tiles",
19+
"type": "raster",
20+
"source": "simple-tiles",
21+
"minzoom": 0,
22+
"maxzoom": 22
23+
}
24+
]
25+
}

met-web/src/components/map/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { Stack } from '@mui/material';
99
import { When } from 'react-if';
1010
import { AnyLayer } from 'mapbox-gl';
1111
import { Palette } from 'styles/Theme';
12+
1213
interface MapProps {
1314
latitude: number;
1415
longitude: number;
@@ -41,8 +42,7 @@ const lineStyle: AnyLayer = {
4142
'line-color': `${Palette.primary.main}`,
4243
},
4344
};
44-
export const MAP_STYLE =
45-
'https://governmentofbc.maps.arcgis.com/sharing/rest/content/items/bbe05270d3a642f5b62203d6c454f457/resources/styles/root.json';
45+
export const MAP_STYLE = process.env.PUBLIC_URL + '/basic-map.json';
4646

4747
const MetMap = ({ geojson, latitude, longitude, markerLabel, zoom }: MapProps) => {
4848
return (

0 commit comments

Comments
 (0)