Projection
Type class
This is a base class for a geographical projection.
Sources
Projection can be used (imported) via one of the following packages.
/** * Import from: "maps.ts" * Use like: am4maps.Projection */import * as am4maps from "@amcharts/amcharts4/maps";/** * Include via: <script src="maps.js"></script> * Access items like: am4maps.Projection */Inheritance
Projection does not extend any other symbol.
Projection is extended by Albers, AlbersUsa, AzimuthalEqualArea, Eckert6, EqualEarth, Mercator, Miller, NaturalEarth1, Orthographic, Stereographic.
Properties
d3ProjectionType
GeoProjectiond3 projection d3 projection
Methods
constructor()Returns
Projectionconvert(geoPoint:IGeoPoint)Returns
IPointConverts a geographical point (lat/long) to a screen point (x/y)
distance(pointA:IGeoPoint,
pointB:IGeoPoint)Returns
numberintermediatePoint(pointA:IGeoPoint,
pointB:IGeoPoint,
position:number)Returns
IGeoPointinvert(point:IPoint)Returns
IGeoPointConverts a screen point (x/y) to a geographical point (lat/long)
multiDistance(multiGeoLine:Array<Array<IGeoPoint>>)Returns
numberpositionToGeoPoint(multiGeoLine:Array<Array<IGeoPoint>>,
position:number)Returns
IGeoPointConverts relative position along the line (0-1) into pixel coordinates.
positionToPoint(multiGeoLine:Array<Array<IGeoPoint>>,
position:number)Returns
IOrientationPointConverts relative position along the line (0-1) into pixel coordinates.
project(lambda:number,
phi:number)Returns
IPointDeprecated Deprecated
Returns X/Y coordinates.
Individual projections will override this method to apply their own projection logic.
unproject(x:number,
y:number)Returns
IGeoPointDeprecated Deprecated
Returns geographical coordinates (lat/long).
Individual projections will override this method to apply their own projection logic.
Events
Projection does not have any events.