public class

HillshadeRasterTileLayer

extends RasterTileLayer
java.lang.Object
   ↳ com.carto.layers.Layer
     ↳ com.carto.layers.TileLayer
       ↳ com.carto.layers.RasterTileLayer
         ↳ com.carto.layers.HillshadeRasterTileLayer

Class Overview

A tile layer that displays an overlay hillshading. Should be used together with corresponding data source that encodes height in RGBA image.
The shading is based on the direction of the main light source, which can be configured using Options class.
Note: this class is experimental and may change or even be removed in future SDK versions.

Summary

Public Constructors
HillshadeRasterTileLayer(TileDataSource dataSource)
Constructs a HillshadeRasterTileLayer object from a data source.
Public Methods
synchronized void delete()
float getContrast()
Returns the contrast of the hillshade overlay.
float getHeightScale()
Returns the height scale of the hillshade overlay.
Color getHighlightColor()
Returns the highlight color of the layer.
Color getShadowColor()
Returns the shadow color of the layer.
void setContrast(float contrast)
Sets the contrast of the hillshade overlay.
void setHeightScale(float heightScale)
Sets the height scale of the hillshade overlay.
void setHighlightColor(Color color)
Sets the highlight color of the layer.
void setShadowColor(Color color)
Sets the shadow color of the layer.
[Expand]
Inherited Methods
From class com.carto.layers.RasterTileLayer
From class com.carto.layers.TileLayer
From class com.carto.layers.Layer
From class java.lang.Object

Public Constructors

public HillshadeRasterTileLayer (TileDataSource dataSource)

Constructs a HillshadeRasterTileLayer object from a data source.

Parameters
dataSource The data source from which this layer loads data.

Public Methods

public synchronized void delete ()

public float getContrast ()

Returns the contrast of the hillshade overlay.

Returns
  • The contrast value (between 0..1). Default is 0.5.

public float getHeightScale ()

Returns the height scale of the hillshade overlay.

Returns
  • The relative height scale. Default is 1.0.

public Color getHighlightColor ()

Returns the highlight color of the layer.

Returns
  • The highlight color of the layer.

public Color getShadowColor ()

Returns the shadow color of the layer.

Returns
  • The shadow color of the layer.

public void setContrast (float contrast)

Sets the contrast of the hillshade overlay.

Parameters
contrast The contrast value (between 0..1).

public void setHeightScale (float heightScale)

Sets the height scale of the hillshade overlay.

Parameters
heightScale The relative height scale. Actual height is multiplied by this values.

public void setHighlightColor (Color color)

Sets the highlight color of the layer.

Parameters
color The new highlight color of the layer.

public void setShadowColor (Color color)

Sets the shadow color of the layer.

Parameters
color The new shadow color of the layer.