@d3-maps/core / annotation
annotation
Table of contents
Functions
getAnnotationGeometry()
ts
function getAnnotationGeometry(__namedParameters?: MapAnnotationGeometryOptions): MapAnnotationGeometry;Returns local connector geometry for an annotation before it is anchored to the map
Parameters
| Parameter | Type |
|---|---|
__namedParameters | MapAnnotationGeometryOptions |
Returns
Variables
MAP_ANNOTATION_DEFAULTS
ts
const MAP_ANNOTATION_DEFAULTS: {
angle: -90;
length: 30;
margin: 0;
};Default local layout values for annotation connectors
Type Declaration
angle
ts
readonly angle: -90 = -90;length
ts
readonly length: 30 = 30;margin
ts
readonly margin: 0 = 0;Interfaces
MapAnnotationGeometry
Local SVG geometry derived from an annotation anchor and layout options
Properties
| Property | Type |
|---|---|
contentTransform | string |
lineCoordinates | MapAnnotationCoordinates[] |
lineTransform | string |
MapAnnotationGeometryOptions
Layout options used to derive local annotation connector geometry
Properties
| Property | Type |
|---|---|
angle? | number |
length? | number |
margin? | number |
MapAnnotationProps
Public annotation props shared across adapters
Extends
MapObjectProps<TStyle>
Type Parameters
| Type Parameter | Default type |
|---|---|
TStyle | unknown |
Properties
| Property | Type | Inherited from |
|---|---|---|
angle? | number | - |
coordinates | MapAnnotationCoordinates | - |
curve? | MapLineCurve | - |
length? | number | - |
margin? | number | - |
midpoint? | MapLineMidpoint | - |
styles? | Partial<Record<"default" | "hover" |
Type Aliases
MapAnnotationCoordinates
ts
type MapAnnotationCoordinates = [number, number];Geographic anchor coordinate for an annotation