Skip to content

Commit

Permalink
Merge pull request #38 from UNopenGIS/tweak-style
Browse files Browse the repository at this point in the history
Add UNClearMapRaster
  • Loading branch information
yuiseki committed Jun 15, 2024
2 parents 7e6a665 + c269fbd commit 4843a76
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
"arcgis",
"arcgisonline",
"BODC",
"clearmap",
"DAAC",
"GEBCO",
"geofabrik",
"Geographics",
"geoservices",
"hinanbasho",
"Maxar",
"naturalearthdata",
Expand Down
21 changes: 21 additions & 0 deletions public/stylejson/geoservices.un.org/clearmap/style.json
Original file line number Diff line number Diff line change
@@ -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": "<a href=\"https://www.un.org/geospatial/\">UN Geospatial</a>"
}
},
"layers": [
{
"id": "un_clearmap",
"source": "un_clearmap",
"type": "raster",
"maxzoom": 6,
"minzoom": 0
}
]
}
6 changes: 4 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -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 (
Expand All @@ -13,9 +14,10 @@ function App() {
display: 'flex',
flexDirection: 'column',
}}>
<UNClearMapRaster />
<OpenStreetMapOrgRaster />
<OpenStreetMapFrHotRaster />
<ArcGisWorldImagery />
<ArcGISWorldImagery />
</div>
</div>
)
Expand Down
Original file line number Diff line number Diff line change
@@ -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 (
<div>
<h2>
Expand Down
24 changes: 24 additions & 0 deletions src/components/UNClearMapRaster/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { Map } from "react-map-gl/maplibre";
import "maplibre-gl/dist/maplibre-gl.css";

export const UNClearMapRaster = () => {
return (
<div>
<h2>
https://unopengis.github.io/foil4g/stylejson/geoservices.un.org/clearmap/style.json
</h2>
<Map
initialViewState={{
longitude: 0,
latitude: 0,
zoom: 4,
}}
dragPan={false}
scrollZoom={false}
hash={false}
style={{ width: "100%", height: "400px" }}
mapStyle="stylejson/geoservices.un.org/clearmap/style.json"
/>
</div>
);
};

0 comments on commit 4843a76

Please sign in to comment.