MapUtils

Type module

Sources

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

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

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

/**
 * --------------------------------------------------------
 * Include via "index.js"
 * E.g.: "https://cdn.amcharts.com/lib/5/index.js"
 * Access items like: am5.mapUtils.myVariable
 *                    am5.mapUtils.myFunction()
 * --------------------------------------------------------
 */

Variables

MapUtils does not have any variables.

Functions

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.