Home > mapbox-geo-circle-layer > GeoCircleLayer > (constructor)
This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Initializes a layer.
Signature:
constructor(id: string, props?: GeoCircleLayerProperties);
Parameter | Type | Description |
---|---|---|
id | string | ID of the layer. |
props | GeoCircleLayerProperties | (Optional) Properties of the circle. |
RangeError
If props.radiusInMeters
is negative, or if props.numTriangles
is less than 3
.
You may omit all or part of props
. The following are default values for the properties, - radiusInMeters
: 50
- center
: { lng: 139.7671, lat: 35.6812 }
(Tokyo Station) - fill
: { red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0 }
(white) - numTriangles
: 32
Since v0.2.0, you no longer have to premultiply the alpha to the red, gree, and blue components of fill
.