Skip to main content

HillshadeLayer

Mapbox spec: hillshade

import { HillshadeLayer } from '@rnmapbox/maps';

HillshadeLayer

props​

id​

string

required A string that uniquely identifies the source in the style to which it is added.

existing​

boolean

The id refers to an existing layer in the style. Does not create a new layer.

sourceID​

string

The source from which to obtain the data to style. If the source has not yet been added to the current style, the behavior is undefined. Inferred from parent source only if the layer is a direct child to it.

defaults to: Mapbox.StyleSource.DefaultSourceID

sourceLayerID​

string

Identifier of the layer within the source identified by the sourceID property from which the receiver obtains the data to style.

aboveLayerID​

string

Inserts a layer above aboveLayerID.

belowLayerID​

string

Inserts a layer below belowLayerID

layerIndex​

number

Inserts a layer at a specified index

filter​

FilterExpression

Filter only the features in the source layer that satisfy a condition that you define

minZoomLevel​

number

The minimum zoom level at which the layer gets parsed and appears.

maxZoomLevel​

number

The maximum zoom level at which the layer gets parsed and appears.

slot​

'bottom' | 'middle' | 'top'

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.

v11 only

style​

HillshadeLayerStyleProps

required Customizable style attributes

styles​


visibility​

Name: visibility

Mapbox spec: visibility

Description​

Whether this layer is displayed.

Type​

enum

Default Value​

visible

Supported Values​

visible - The layer is shown.
none - The layer is not shown.

Expression​

Parameters: ``


hillshadeIlluminationDirection​

Name: hillshadeIlluminationDirection

Mapbox spec: hillshade-illumination-direction

Description​

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.

Type​

number

Default Value​

335

Minimum​

0

Maximum​

359

Expression​

Parameters: zoom


hillshadeIlluminationAnchor​

Name: hillshadeIlluminationAnchor

Mapbox spec: hillshade-illumination-anchor

Description​

Direction of light source when map is rotated.

Type​

enum

Default Value​

viewport

Supported Values​

map - The hillshade illumination is relative to the north direction.
viewport - The hillshade illumination is relative to the top of the viewport.

Expression​

Parameters: zoom


hillshadeExaggeration​

Name: hillshadeExaggeration

Mapbox spec: hillshade-exaggeration

Description​

Intensity of the hillshade

Type​

number

Default Value​

0.5

Minimum​

0

Maximum​

1

Expression​

Parameters: zoom


hillshadeExaggerationTransition​

Name: hillshadeExaggerationTransition

Description​

The transition affecting any changes to this layer’s hillshadeExaggeration property.

Type​

{ duration, delay }

Units​

milliseconds

Default Value​

{duration: 300, delay: 0}


hillshadeShadowColor​

Name: hillshadeShadowColor

Mapbox spec: hillshade-shadow-color

Description​

The shading color of areas that face away from the light source.

Type​

color

Default Value​

#000000

Expression​

Parameters: zoom, measure-light


hillshadeShadowColorTransition​

Name: hillshadeShadowColorTransition

Description​

The transition affecting any changes to this layer’s hillshadeShadowColor property.

Type​

{ duration, delay }

Units​

milliseconds

Default Value​

{duration: 300, delay: 0}


hillshadeHighlightColor​

Name: hillshadeHighlightColor

Mapbox spec: hillshade-highlight-color

Description​

The shading color of areas that faces towards the light source.

Type​

color

Default Value​

#FFFFFF

Expression​

Parameters: zoom, measure-light


hillshadeHighlightColorTransition​

Name: hillshadeHighlightColorTransition

Description​

The transition affecting any changes to this layer’s hillshadeHighlightColor property.

Type​

{ duration, delay }

Units​

milliseconds

Default Value​

{duration: 300, delay: 0}


hillshadeAccentColor​

Name: hillshadeAccentColor

Mapbox spec: hillshade-accent-color

Description​

The shading color used to accentuate rugged terrain like sharp cliffs and gorges.

Type​

color

Default Value​

#000000

Expression​

Parameters: zoom, measure-light


hillshadeAccentColorTransition​

Name: hillshadeAccentColorTransition

Description​

The transition affecting any changes to this layer’s hillshadeAccentColor property.

Type​

{ duration, delay }

Units​

milliseconds

Default Value​

{duration: 300, delay: 0}


hillshadeEmissiveStrength​

Name: hillshadeEmissiveStrength

Mapbox spec: hillshade-emissive-strength

Description​

Controls the intensity of light emitted on the source features.

Type​

number

Default Value​

0

Units​

intensity

Minimum​

0

Requires​

lights

Expression​

Parameters: zoom, measure-light


hillshadeEmissiveStrengthTransition​

Name: hillshadeEmissiveStrengthTransition

Description​

The transition affecting any changes to this layer’s hillshadeEmissiveStrength property.

Type​

{ duration, delay }

Units​

milliseconds

Default Value​

{duration: 300, delay: 0}