Skip to content

Commit dfc06d8

Browse files
Update docs from maps rnmapbox/maps@8282a7c
1 parent 651ee37 commit dfc06d8

64 files changed

Lines changed: 533 additions & 81 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/components/HillshadeLayer.md

Lines changed: 385 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,385 @@
1+
---
2+
custom_edit_url: https://github.com/rnmapbox/maps/blob/main/src/components/HillshadeLayer.tsx
3+
---
4+
5+
Mapbox spec: [hillshade](https://docs.mapbox.com/mapbox-gl-js/style-spec/layers/#hillshade)
6+
7+
8+
```tsx
9+
import { HillshadeLayer } from '@rnmapbox/maps';
10+
11+
HillshadeLayer
12+
13+
```
14+
15+
16+
## props
17+
18+
19+
### id
20+
21+
```tsx
22+
string
23+
```
24+
_required_
25+
A string that uniquely identifies the source in the style to which it is added.
26+
27+
28+
29+
### existing
30+
31+
```tsx
32+
boolean
33+
```
34+
The id refers to an existing layer in the style. Does not create a new layer.
35+
36+
37+
38+
### sourceID
39+
40+
```tsx
41+
string
42+
```
43+
The source from which to obtain the data to style.
44+
If the source has not yet been added to the current style, the behavior is undefined.
45+
Inferred from parent source only if the layer is a direct child to it.
46+
47+
_defaults to:_ `Mapbox.StyleSource.DefaultSourceID`
48+
49+
50+
### sourceLayerID
51+
52+
```tsx
53+
string
54+
```
55+
Identifier of the layer within the source identified by the sourceID property from which the receiver obtains the data to style.
56+
57+
58+
59+
### aboveLayerID
60+
61+
```tsx
62+
string
63+
```
64+
Inserts a layer above aboveLayerID.
65+
66+
67+
68+
### belowLayerID
69+
70+
```tsx
71+
string
72+
```
73+
Inserts a layer below belowLayerID
74+
75+
76+
77+
### layerIndex
78+
79+
```tsx
80+
number
81+
```
82+
Inserts a layer at a specified index
83+
84+
85+
86+
### filter
87+
88+
```tsx
89+
FilterExpression
90+
```
91+
Filter only the features in the source layer that satisfy a condition that you define
92+
93+
94+
95+
### minZoomLevel
96+
97+
```tsx
98+
number
99+
```
100+
The minimum zoom level at which the layer gets parsed and appears.
101+
102+
103+
104+
### maxZoomLevel
105+
106+
```tsx
107+
number
108+
```
109+
The maximum zoom level at which the layer gets parsed and appears.
110+
111+
112+
113+
### slot
114+
115+
```tsx
116+
'bottom' | 'middle' | 'top'
117+
```
118+
The slot this layer is assigned to. If specified, and a slot with that name exists, it will be placed at that position in the layer order.
119+
120+
v11 only
121+
122+
123+
124+
### style
125+
126+
```tsx
127+
HillshadeLayerStyleProps
128+
```
129+
_required_
130+
Customizable style attributes
131+
132+
133+
134+
135+
136+
137+
138+
139+
140+
## styles
141+
142+
* <a href="#visibility">visibility</a><br/>
143+
* <a href="#hillshadeilluminationdirection">hillshadeIlluminationDirection</a><br/>
144+
* <a href="#hillshadeilluminationanchor">hillshadeIlluminationAnchor</a><br/>
145+
* <a href="#hillshadeexaggeration">hillshadeExaggeration</a><br/>
146+
* <a href="#hillshadeshadowcolor">hillshadeShadowColor</a><br/>
147+
* <a href="#hillshadehighlightcolor">hillshadeHighlightColor</a><br/>
148+
* <a href="#hillshadeaccentcolor">hillshadeAccentColor</a><br/>
149+
150+
___
151+
152+
### visibility
153+
Name: `visibility`
154+
155+
Mapbox spec: [visibility](https://docs.mapbox.com/style-spec/reference/layers/#layout-hillshade-visibility)
156+
157+
#### Description
158+
Whether this layer is displayed.
159+
160+
#### Type
161+
`enum`
162+
#### Default Value
163+
`visible`
164+
165+
#### Supported Values
166+
**visible** - The layer is shown.<br />
167+
**none** - The layer is not shown.<br />
168+
169+
170+
#### Expression
171+
172+
Parameters: ``
173+
174+
___
175+
176+
### hillshadeIlluminationDirection
177+
Name: `hillshadeIlluminationDirection`
178+
179+
Mapbox spec: [hillshade-illumination-direction](https://docs.mapbox.com/style-spec/reference/layers/#paint-hillshade-hillshade-illumination-direction)
180+
181+
#### Description
182+
The direction of the light source used to generate the hillshading with 0 as the top of the viewport if `hillshadeIlluminationAnchor` is set to `viewport` and due north if `hillshadeIlluminationAnchor` is set to `map` and no 3d lights enabled. If `hillshadeIlluminationAnchor` is set to `map` and 3d lights enabled, the direction from 3d lights is used instead.
183+
184+
#### Type
185+
`number`
186+
#### Default Value
187+
`335`
188+
189+
#### Minimum
190+
`0`
191+
192+
193+
#### Maximum
194+
`359`
195+
196+
#### Expression
197+
198+
Parameters: `zoom`
199+
200+
___
201+
202+
### hillshadeIlluminationAnchor
203+
Name: `hillshadeIlluminationAnchor`
204+
205+
Mapbox spec: [hillshade-illumination-anchor](https://docs.mapbox.com/style-spec/reference/layers/#paint-hillshade-hillshade-illumination-anchor)
206+
207+
#### Description
208+
Direction of light source when map is rotated.
209+
210+
#### Type
211+
`enum`
212+
#### Default Value
213+
`viewport`
214+
215+
#### Supported Values
216+
**map** - The hillshade illumination is relative to the north direction.<br />
217+
**viewport** - The hillshade illumination is relative to the top of the viewport.<br />
218+
219+
220+
#### Expression
221+
222+
Parameters: `zoom`
223+
224+
___
225+
226+
### hillshadeExaggeration
227+
Name: `hillshadeExaggeration`
228+
229+
Mapbox spec: [hillshade-exaggeration](https://docs.mapbox.com/style-spec/reference/layers/#paint-hillshade-hillshade-exaggeration)
230+
231+
#### Description
232+
Intensity of the hillshade
233+
234+
#### Type
235+
`number`
236+
#### Default Value
237+
`0.5`
238+
239+
#### Minimum
240+
`0`
241+
242+
243+
#### Maximum
244+
`1`
245+
246+
#### Expression
247+
248+
Parameters: `zoom`
249+
___
250+
251+
### hillshadeExaggerationTransition
252+
Name: `hillshadeExaggerationTransition`
253+
254+
#### Description
255+
256+
The transition affecting any changes to this layer’s hillshadeExaggeration property.
257+
258+
#### Type
259+
260+
`{ duration, delay }`
261+
262+
#### Units
263+
`milliseconds`
264+
265+
#### Default Value
266+
`{duration: 300, delay: 0}`
267+
268+
269+
___
270+
271+
### hillshadeShadowColor
272+
Name: `hillshadeShadowColor`
273+
274+
Mapbox spec: [hillshade-shadow-color](https://docs.mapbox.com/style-spec/reference/layers/#paint-hillshade-hillshade-shadow-color)
275+
276+
#### Description
277+
The shading color of areas that face away from the light source.
278+
279+
#### Type
280+
`color`
281+
#### Default Value
282+
`#000000`
283+
284+
285+
#### Expression
286+
287+
Parameters: `zoom, measure-light`
288+
___
289+
290+
### hillshadeShadowColorTransition
291+
Name: `hillshadeShadowColorTransition`
292+
293+
#### Description
294+
295+
The transition affecting any changes to this layer’s hillshadeShadowColor property.
296+
297+
#### Type
298+
299+
`{ duration, delay }`
300+
301+
#### Units
302+
`milliseconds`
303+
304+
#### Default Value
305+
`{duration: 300, delay: 0}`
306+
307+
308+
___
309+
310+
### hillshadeHighlightColor
311+
Name: `hillshadeHighlightColor`
312+
313+
Mapbox spec: [hillshade-highlight-color](https://docs.mapbox.com/style-spec/reference/layers/#paint-hillshade-hillshade-highlight-color)
314+
315+
#### Description
316+
The shading color of areas that faces towards the light source.
317+
318+
#### Type
319+
`color`
320+
#### Default Value
321+
`#FFFFFF`
322+
323+
324+
#### Expression
325+
326+
Parameters: `zoom, measure-light`
327+
___
328+
329+
### hillshadeHighlightColorTransition
330+
Name: `hillshadeHighlightColorTransition`
331+
332+
#### Description
333+
334+
The transition affecting any changes to this layer’s hillshadeHighlightColor property.
335+
336+
#### Type
337+
338+
`{ duration, delay }`
339+
340+
#### Units
341+
`milliseconds`
342+
343+
#### Default Value
344+
`{duration: 300, delay: 0}`
345+
346+
347+
___
348+
349+
### hillshadeAccentColor
350+
Name: `hillshadeAccentColor`
351+
352+
Mapbox spec: [hillshade-accent-color](https://docs.mapbox.com/style-spec/reference/layers/#paint-hillshade-hillshade-accent-color)
353+
354+
#### Description
355+
The shading color used to accentuate rugged terrain like sharp cliffs and gorges.
356+
357+
#### Type
358+
`color`
359+
#### Default Value
360+
`#000000`
361+
362+
363+
#### Expression
364+
365+
Parameters: `zoom, measure-light`
366+
___
367+
368+
### hillshadeAccentColorTransition
369+
Name: `hillshadeAccentColorTransition`
370+
371+
#### Description
372+
373+
The transition affecting any changes to this layer’s hillshadeAccentColor property.
374+
375+
#### Type
376+
377+
`{ duration, delay }`
378+
379+
#### Units
380+
`milliseconds`
381+
382+
#### Default Value
383+
`{duration: 300, delay: 0}`
384+
385+
0 Bytes
Loading
0 Bytes
Loading
0 Bytes
Loading
0 Bytes
Loading
0 Bytes
Loading
0 Bytes
Loading
0 Bytes
Loading
0 Bytes
Loading
0 Bytes
Loading

0 commit comments

Comments
 (0)