Skip to main content

Interface: PinImage

Defined in: spec/types.ts:305

A map pin: a teardrop in color with an icon drawn inside it. GeoVis builds the image itself and registers it on the map under id, so a symbol layer shows it with paint.iconImage: id.

Example​

const pin: PinImage = {
id: 'hospital-pin',
kind: 'pin',
icon: 'maki:hospital',
color: '#C0392B',
};

Properties​

color​

color: string

Defined in: spec/types.ts:316

Fill colour of the pin.


icon​

icon: string

Defined in: spec/types.ts:314

@ttoss/react-icons (Iconify) name of the icon drawn inside the pin, e.g. 'maki:hospital'. Resolved from the icons registered with addIcon, or fetched from the Iconify API when it is not registered.


iconColor?​

optional iconColor?: string

Defined in: spec/types.ts:318

Colour of the icon inside the pin.

Default​

'#ffffff'

id​

id: string

Defined in: spec/types.ts:307

Name the image is registered under — what paint.iconImage refers to.


kind​

kind: "pin"

Defined in: spec/types.ts:308


size?​

optional size?: number

Defined in: spec/types.ts:320

Pin width in CSS pixels; its height follows the teardrop's shape.

Default​

28