From c269fbd378d6e327d9a501e2cf72d4ef852b9846 Mon Sep 17 00:00:00 2001 From: yuiseki Date: Sat, 15 Jun 2024 16:44:06 +0900 Subject: [PATCH] Add UNClearMapRaster --- .vscode/settings.json | 2 ++ .../geoservices.un.org/clearmap/style.json | 21 ++++++++++++++++ src/App.tsx | 6 +++-- .../index.tsx | 2 +- src/components/UNClearMapRaster/index.tsx | 24 +++++++++++++++++++ 5 files changed, 52 insertions(+), 3 deletions(-) create mode 100644 public/stylejson/geoservices.un.org/clearmap/style.json rename src/components/{ArcGisWorldImagery => ArcGISWorldImagery}/index.tsx (93%) create mode 100644 src/components/UNClearMapRaster/index.tsx diff --git a/.vscode/settings.json b/.vscode/settings.json index a9350c9..b795faa 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,10 +5,12 @@ "arcgis", "arcgisonline", "BODC", + "clearmap", "DAAC", "GEBCO", "geofabrik", "Geographics", + "geoservices", "hinanbasho", "Maxar", "naturalearthdata", diff --git a/public/stylejson/geoservices.un.org/clearmap/style.json b/public/stylejson/geoservices.un.org/clearmap/style.json new file mode 100644 index 0000000..08ed7cd --- /dev/null +++ b/public/stylejson/geoservices.un.org/clearmap/style.json @@ -0,0 +1,21 @@ +{ + "version": 8, + "sources": { + "un_clearmap": { + "type": "raster", + "tiles": [ + "https://geoservices.un.org/arcgis/rest/services/ClearMap_WebTopo/MapServer/tile/{z}/{y}/{x}" + ], + "attribution": "UN Geospatial" + } + }, + "layers": [ + { + "id": "un_clearmap", + "source": "un_clearmap", + "type": "raster", + "maxzoom": 6, + "minzoom": 0 + } + ] +} diff --git a/src/App.tsx b/src/App.tsx index 1abaf7d..fbb9e98 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,7 +1,8 @@ import './App.css' -import { ArcGisWorldImagery } from './components/ArcGisWorldImagery' +import { ArcGISWorldImagery } from './components/ArcGISWorldImagery' import { OpenStreetMapFrHotRaster } from './components/OpenStreetMapFrHotRaster' import { OpenStreetMapOrgRaster } from './components/OpenStreetMapOrgRaster' +import { UNClearMapRaster } from './components/UNClearMapRaster' function App() { return ( @@ -13,9 +14,10 @@ function App() { display: 'flex', flexDirection: 'column', }}> + - + ) diff --git a/src/components/ArcGisWorldImagery/index.tsx b/src/components/ArcGISWorldImagery/index.tsx similarity index 93% rename from src/components/ArcGisWorldImagery/index.tsx rename to src/components/ArcGISWorldImagery/index.tsx index 26b59df..7c6a0c3 100644 --- a/src/components/ArcGisWorldImagery/index.tsx +++ b/src/components/ArcGISWorldImagery/index.tsx @@ -1,7 +1,7 @@ import { Map } from "react-map-gl/maplibre"; import "maplibre-gl/dist/maplibre-gl.css"; -export const ArcGisWorldImagery = () => { +export const ArcGISWorldImagery = () => { return (

diff --git a/src/components/UNClearMapRaster/index.tsx b/src/components/UNClearMapRaster/index.tsx new file mode 100644 index 0000000..e183005 --- /dev/null +++ b/src/components/UNClearMapRaster/index.tsx @@ -0,0 +1,24 @@ +import { Map } from "react-map-gl/maplibre"; +import "maplibre-gl/dist/maplibre-gl.css"; + +export const UNClearMapRaster = () => { + return ( +
+

+ https://unopengis.github.io/foil4g/stylejson/geoservices.un.org/clearmap/style.json +

+ +
+ ); +}; \ No newline at end of file