MapUtils

Type module

Sources

Items from MapUtils can be imported/included and used via following ways.

/**
 * --------------------------------------------------------
 * Import via: MapUtils.ts
 * Access items like: $maputils.myVariable
 *                    $maputils.myFunction()
 * --------------------------------------------------------
 */
import * as $maputils from "@amcharts/amcharts5/MapUtils";

Variables

MapUtils does not have any variables.

Functions

getGeoArea(

geometry: GeoJSON.GeometryObject

)

#

Returns number

Returns geo area of a geometry

getGeoBounds(

geometry: GeoJSON.GeometryObject

)

#

Returns void

Returns bounds of a geometry

getGeoCentroid(

geometry: GeoJSON.GeometryObject

)

#

Returns IGeoPoint

Returns geo centroid of a geometry

getGeoCircle(

geoPoint: IGeoPoint,
radius: number

)

#

Returns Polygon

Returns a GeoJSON representation of a circle, suitable for use as geometry value in a MapPolygon in a MapPolygonSeries.

getGeoRectangle(

north: number,
east: number,
south: number,
west: number

)

#

Returns MultiPolygon

Returns a GeoJSON representation of a rectangle, suitable for use as geometry value in a MapPolygon in a MapPolygonSeries.

normalizeGeoPoint(

geoPoint: IGeoPoint

)

#

Returns IGeoPoint

Update longitudes and latitudes that wrap around -180/180 and -90/90 values.