Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add UNClearMapRaster #38

Merged
merged 1 commit into from
Jun 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
);
};