@d3-maps/core / marker
marker
Table of contents
Functions
getMarkerTransform()
ts
function getMarkerTransform(
context: MapContext | undefined,
coordinates: MapMarkerCoordinates,
fallback?: string): string;Computes an SVG transform (translate(x, y)) for the given coordinates using the active projection.
Coordinates must be [longitude, latitude].
Parameters
| Parameter | Type | Default value |
|---|---|---|
context | MapContext | undefined |
coordinates | MapMarkerCoordinates | undefined |
fallback | string | 'translate(0, 0)' |
Returns
string
Interfaces
MapMarkerProps
Shared props contract for marker layers.
Type Parameters
| Type Parameter | Default type |
|---|---|
TStyle | unknown |
Properties
| Property | Type |
|---|---|
coordinates? | MapMarkerCoordinates |
styles? | Partial<Record<"default" |
Type Aliases
MapMarkerCoordinates
ts
type MapMarkerCoordinates = [number, number];