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