Projection

Type class

This is a base class for a geographical projection.

Sources

Projection can be used (imported) via one of the following packages.

// Projection is available in all of the following modules.
// You only need to import one of them.

/**
 * --------------------------------------------------------
 * Import from: "maps.ts"
 * Use like: am4maps.Projection
 * --------------------------------------------------------
 */
import * as am4maps from "@amcharts/amcharts4/maps";

// Projection is available in all of the following modules.
// You only need to import one of them.

/**
 * --------------------------------------------------------
 * Include via: <script src="maps.js"></script>
 * Access items like: am4maps.Projection
 * --------------------------------------------------------
 */

Inheritance

Projection does not extend any other symbol.

Projection is extended by Eckert6, Mercator, Miller, Orthographic.

Properties

deltaGama
#

Type number

Default 0

deltaLatitude
#

Type number

Default 0

deltaLongitude
#

Type number

Default 0

scale
#

Type number

Default 1

Methods

clip(

subjectPolygon: IGeoPoint[],
clipPolygon: IGeoPoint[]

)

#

Returns void

clipLine(

subjectPolyline: IGeoPoint[],
clipPolygon: IGeoPoint[]

)

#

Returns void

convert(

geoPoint: IGeoPoint

)

#

Returns IPoint

Converts a geographical point (lat/long) to a screen point (x/y)

getClipRectangle1()

#

Returns void

getClipRectangle2()

#

Returns void

getExtremes(

geoPoints: IGeoPoint[]

)

#

Returns IGeoRectangle

getRect1()

#

Returns IGeoRectangle

getRect2()

#

Returns IGeoRectangle

intermediatePoint(

pointA: IGeoPoint,
pointB: IGeoPoint,
position: number

)

#

Returns void

invert(

point: IPoint

)

#

Returns IGeoPoint

Converts a screen point (x/y) to a geographical point (lat/long)

isInside(

r1: IGeoRectangle,
r2: IGeoRectangle

)

#

Returns boolean

isOutside(

r1: IGeoRectangle,
r2: IGeoRectangle

)

#

Returns boolean

project(

lambda: number,
phi: number

)

#

Returns IPoint

Returns X/Y coordinates.

Individual projections will override this method to apply their own projection logic.

@todo Needs description

projectGeoArea(

geoArea: IGeoPoint[]

)

#

Returns void

projectGeoLine(

geoLine: IGeoPoint[]

)

#

Returns void

rotate(

geoPoint: IGeoPoint,
deltaLongitude: number,
deltaLatitude: number,
deltaGamma?: number

)

#

Returns IGeoPoint

unproject(

x: number,
y: number

)

#

Returns IGeoPoint

Returns geographical coordinates (lat/long).

Individual projections will override this method to apply their own projection logic.

@todo Needs description

unrotate(

geoPoint: IGeoPoint,
deltaLongitude: number,
deltaLatitude: number,
deltaGamma?: number

)

#

Returns IGeoPoint

Events

Projection does not have any events.

Adapters

Projection does not have any adapters.