Skip to content

Commit

Permalink
Merge pull request #99 from UNopenGIS/fixed-gel-rikaishita
Browse files Browse the repository at this point in the history
Smart Maps GELを完全に理解した
  • Loading branch information
yuiseki authored Jul 1, 2024
2 parents 0a6c619 + 274b5ca commit ebbf77e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/components/Datasets/GEL/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,18 @@ export const GELMap = () => {
initialViewState={{
longitude: 0,
latitude: 0,
pitch: 50,
zoom: 6,
}}
dragPan={true}
scrollZoom={true}
hash={true}
style={{ width: "100%", height: "100%" }}
mapStyle="stylejson/tile.openstreetmap.jp/fiord-color-gl-style/style.json"
terrain={{ source: source.id }}
>
<Source key={source.id} {...source}>
{source.layers?.map((layer) => <Layer key={layer.id} source-layer={layer.sourceLayer} {...layer} />)}
{source.layers?.map((layer) => <Layer key={layer.id} {...layer} />)}
</Source>
</Map>
);
Expand Down
6 changes: 4 additions & 2 deletions src/components/Datasets/GEL/source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import { PMTilesSource } from "../../../types/PMTilesSource";

export const GELPMTilesSource: PMTilesSource = {
id: "gel-source",
url: "pmtiles://https://data.source.coop/smartmaps/gel/gel.pmtiles",
tiles: [
"pmtiles://https://data.source.coop/smartmaps/gel/gel.pmtiles/{z}/{x}/{y}.webp",
],
tileSize: 512,
type: "raster-dem",
attribution:
'<a href="https://lpdaac.usgs.gov/products/nasadem_hgtv001/">NASADEM</a>, <a href="https://globalmaps.github.io/">Global Map (ISCGM)</a>',
Expand All @@ -16,7 +19,6 @@ export const GELPMTilesSource: PMTilesSource = {
id: "gel-hills",
type: "hillshade",
source: "gel-source",
sourceLayer: "hillshade",
paint: {
"hillshade-shadow-color": "#473B24",
},
Expand Down

0 comments on commit ebbf77e

Please sign in to comment.