Skip to content

Commit

Permalink
Add hillshading
Browse files Browse the repository at this point in the history
  • Loading branch information
arindam1993 committed Feb 18, 2025
1 parent f5a9654 commit bda79d0
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion src/components/BikeHopperMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ const BikeHopperMap = forwardRef(function BikeHopperMapInternal(
height: '100%',
}}
onLoad={handleMapLoad}
mapStyle="mapbox://styles/arindam1993/cm77a1cee01lj01sd6x37gfre"
mapStyle="mapbox://styles/arindam1993/cm7agbvz0003c01s86shbcfhg"
transformRequest={transformRequest}
interactiveLayerIds={INTERACTIVE_LAYER_IDS}
onMouseMove={!_isTouch ? handleMapMouseMove : undefined}
Expand Down Expand Up @@ -724,6 +724,25 @@ const BikeHopperMap = forwardRef(function BikeHopperMapInternal(
{...getTransitTilesStopNamesStyle(activeStops)}
/>
</Source>
<Source
id="hillshadeSource"
type="raster-dem"
tiles={[
`https://api.mapbox.com/v4/mapbox.terrain-rgb/{z}/{x}/{y}.png?access_token=${import.meta.env.VITE_MAPBOX_TOKEN}
`,
]}
tileSize={256}
minzoom={0}
maxzoom={14}
>
<Layer
type="hillshade"
paint={{
'hillshade-exaggeration': 0.2,
'hillshade-shadow-color': 'rgba(0,0,0,0.2)',
}}
/>
</Source>
{startCoords && (
<Marker
longitude={startCoords[0]}
Expand Down

0 comments on commit bda79d0

Please sign in to comment.