Manta Developers
GitHub
Menu

@manta-eu/react/region-map

Reference for @manta-eu/react/region-map as it is on main.

Type Aliases

Box

Box = object

Properties

bottom

bottom: number

left

left: number

right: number

top

top: number


FitRegionMapArgs

FitRegionMapArgs = object

Properties

focus

focus: readonly RegionMapShape[]

height?

optional height?: number

points?

optional points?: readonly FocusPoint[]

projection?

optional projection?: RegionMapProjection

width

width: number


FocusPoint

FocusPoint = object

Properties

coordinates

coordinates: [number, number]


GeographyReading

GeographyReading = { error: null; shapes: RegionMapShape[]; } | { error: string; shapes: []; }


LabelCandidate

LabelCandidate = object

Properties

id

id: string

radius?

optional radius?: number

text

text: string

x

x: number

y

y: number


PlacedLabel

PlacedLabel = object

Properties

anchor

anchor: "start" | "middle" | "end"

box

box: Box

id

id: string

text

text: string

x

x: number

y

y: number


PlaceLabelsArgs

PlaceLabelsArgs = object

Properties

candidates

candidates: readonly LabelCandidate[]

fontSize?

optional fontSize?: number

height

height: number

obstacles?

optional obstacles?: readonly Box[]

width

width: number


ReadGeographyOptions

ReadGeographyOptions = object

Properties

idProperty?

optional idProperty?: string


RegionMapFrame

RegionMapFrame = object

Properties

height

height: number

margin

margin: number

projection

projection: GeoProjection

width

width: number


RegionMapGeography

RegionMapGeography = { geojson: unknown; } | { object: string; topojson: unknown; }


RegionMapMeasure

RegionMapMeasure = object

Properties

format?

optional format?: (value) => string

Parameters
value

number

Returns

string

label

label: string


RegionMapMultiPolygon

RegionMapMultiPolygon = object

Properties

coordinates

coordinates: number[][][][]

type

type: "MultiPolygon"


RegionMapPlace

RegionMapPlace = object

Properties

coordinates

coordinates: [number, number]

id

id: string

name

name: string

named?

optional named?: boolean

value?

optional value?: number | null


RegionMapPolygon

RegionMapPolygon = object

Properties

coordinates

coordinates: number[][][]

type

type: "Polygon"


RegionMapProjection

RegionMapProjection = "conic" | "mercator" | "equal-earth"


RegionMapProps

RegionMapProps = object

Properties

activeId?

optional activeId?: string | null

className?

optional className?: string

credit?

optional credit?: ReactNode

geography

geography: RegionMapGeography

The land: GeoJSON features, or a TopoJSON topology and its object’s name, in degrees. The SDK bundles none.

height?

optional height?: number

idProperty?

optional idProperty?: string

label

label: string

measure

measure: RegionMapMeasure

onActiveChange?

optional onActiveChange?: (id) => void

Parameters
id

string | null

Returns

void

onSelect?

optional onSelect?: (id) => void

Parameters
id

string

Returns

void

places?

optional places?: RegionMapPlace[]

projection?

optional projection?: RegionMapProjection

regions?

optional regions?: RegionMapRegion[]

steps?

optional steps?: number


RegionMapRegion

RegionMapRegion = object

Properties

id

id: string

name

name: string

named?

optional named?: boolean

value?

optional value?: number | null

Missing or null when there is no figure: the region is hatched, never drawn as a zero.


RegionMapScale

RegionMapScale = object

Properties

bounds

bounds: number[]

stepOf

stepOf: (value) => number

Parameters
value

number

Returns

number

steps

steps: number


RegionMapShape

RegionMapShape = object

Properties

geometry

geometry: RegionMapPolygon | RegionMapMultiPolygon

id

id: string | null

properties

properties: Record<string, unknown>


RegionRankItem

RegionRankItem = object

Properties

id

id: string

name

name: string

value?

optional value?: number | null


RegionRankListProps

RegionRankListProps = object

Properties

activeId?

optional activeId?: string | null

className?

optional className?: string

items

items: RegionRankItem[]

label

label: string

measure

measure: RegionMapMeasure

onActiveChange?

optional onActiveChange?: (id) => void

Parameters
id

string | null

Returns

void

onSelect?

optional onSelect?: (id) => void

Parameters
id

string

Returns

void

steps?

optional steps?: number

Variables

regionMapMaxSteps

const regionMapMaxSteps: 5 = 5

Functions

fitRegionMap()

fitRegionMap(args): RegionMapFrame

Parameters

args

FitRegionMapArgs

Returns

RegionMapFrame


placeLabels()

placeLabels(args): PlacedLabel[]

Parameters

args

PlaceLabelsArgs

Returns

PlacedLabel[]


readGeography()

readGeography(geography, options?): GeographyReading

Parameters

geography

RegionMapGeography

options?

ReadGeographyOptions = {}

Returns

GeographyReading


RegionMap()

RegionMap(props): Element

Parameters

props

RegionMapProps

Returns

Element


regionMapScale()

regionMapScale(values, steps?): RegionMapScale | null

Parameters

values

readonly number[]

steps?

number = regionMapMaxSteps

Returns

RegionMapScale | null


RegionRankList()

RegionRankList(props): Element

Parameters

props

RegionRankListProps

Returns

Element