Skip to content

Latest commit

 

History

History
36 lines (21 loc) · 1.42 KB

mapbox-geo-circle-layer.geocirclelayer._constructor_.md

File metadata and controls

36 lines (21 loc) · 1.42 KB

Home > mapbox-geo-circle-layer > GeoCircleLayer > (constructor)

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);

Parameters

Parameter Type Description
id string ID of the layer.
props GeoCircleLayerProperties (Optional) Properties of the circle.

Exceptions

RangeError

If props.radiusInMeters is negative, or if props.numTriangles is less than 3.

Remarks

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.