Skip to main content

Interface: PinImage

Defined in: spec/types.ts:313

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:324

Fill colour of the pin.


icon​

icon: string

Defined in: spec/types.ts:322

@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:326

Colour of the icon inside the pin.

Default​

'#ffffff'

id​

id: string

Defined in: spec/types.ts:315

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


kind​

kind: "pin"

Defined in: spec/types.ts:316


size?​

optional size?: number

Defined in: spec/types.ts:328

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

Default​

28