Skip to main content


The GeohashLayer renders filled and/or stroked polygons based on the Geohash geospatial indexing system.

GeohashLayer is a CompositeLayer.

import {Deck} from '';
import {GeohashLayer} from '';

const layer = new GeohashLayer({
id: 'GeohashLayer',
data: '',

extruded: true,
getGeohash: d => d.geohash,
getElevation: d => d.value,
getFillColor: d => [d.value * 255, (1 - d.value) * 128, (1 - d.value) * 255],
elevationScale: 1000,
pickable: true

new Deck({
initialViewState: {
longitude: -122.4,
latitude: 37.74,
zoom: 11
controller: true,
getTooltip: ({object}) => object && `${object.geohash} value: ${object.value}`,
layers: [layer]


To install the dependencies from NPM:

npm install
# or
npm install
import {GeohashLayer} from '';
import type {GeohashLayerProps} from '';

new GeohashLayer<DataT>(...props: GeohashLayerProps<DataT>[]);

To use pre-bundled scripts:

<script src="^9.0.0/dist.min.js"></script>
<!-- or -->
<script src="^9.0.0/dist.min.js"></script>
<script src="^9.0.0/dist.min.js"></script>
<script src="^9.0.0/dist.min.js"></script>
new deck.GeohashLayer({});


Inherits from all Base Layer, CompositeLayer, and PolygonLayer properties, plus the following:

Data Accessors

getGeohash (Accessor<string>, optional)

Called for each data object to retrieve the geohash string identifier.

  • default: object => object.geohash

Sub Layers

The GeohashLayer renders the following sublayers: