import { Coordinate, Extent, Point, PointExtent, Size } from '../geo';
declare module "./Map" {
interface Map {
/**
* Converts a coordinate to the 2D point in current zoom or in the specific zoom.
* The 2D point's coordinate system's origin is the same with map's origin.
* Usually used in plugin development.
* @param coordinate - coordinate
* @param zoom - zoom level
* @param out - optional point to receive result
* @return 2D point
* @example
* var point = map.coordinateToPoint(new Coordinate(121.3, 29.1));
*/
coordinateToPoint(coordinate: Coordinate, zoom?: number, out?: Point): Point;
/**
* Converts a coordinate to the 2D point at specified resolution.
* The 2D point's coordinate system's origin is the same with map's origin.
* Usually used in plugin development.
* @param coordinate - coordinate
* @param res - target resolution
* @param out - optional point to receive result
* @return 2D point
* @example
* var point = map.coordinateToPoint(new Coordinate(121.3, 29.1));
*/
coordinateToPointAtRes(coordinate: Coordinate, res?: number, out?: Point): Point;
/**
* Converts a 2D point in current zoom or a specific zoom to a coordinate.
* Usually used in plugin development.
* @param point - 2D point
* @param zoom - point's zoom level
* @param out - optional coordinate to receive result
* @return coordinate
* @example
* var coord = map.pointToCoordinate(new Point(4E6, 3E4));
*/
pointToCoordinate(point: Point, zoom?: number, out?: Coordinate): Coordinate;
/**
* Converts a 2D point at specific resolution to a coordinate.
* Usually used in plugin development.
* @param point - 2D point
* @param res - point's resolution
* @param out - optional coordinate to receive result
* @return coordinate
* @example
* var coord = map.pointAtResToCoordinate(new Point(4E6, 3E4), map.getResolution());
*/
pointAtResToCoordinate(point: Point, res?: number, out?: Coordinate): Coordinate;
/**
* Converts a geographical coordinate to view point.
* A view point is a point relative to map's mapPlatform panel's position.
* Usually used in plugin development.
* @param coordinate
* @param out - optional point to receive result
* @return */
coordinateToViewPoint(coordinate: Coordinate, out?: Point, altitude?: number): Point;
/**
* Converts a view point to the geographical coordinate.
* Usually used in plugin development.
* @param viewPoint
* @param out - optional coordinate to receive result
* @return */
viewPointToCoordinate(viewPoint: Point, out?: Coordinate): Coordinate;
/**
* Convert a geographical coordinate to the container point.
* A container point is a point relative to map container's top-left corner.
* @param - coordinate
* @param zoom - zoom level
* @param out - optional point to receive result
* @return */
coordinateToContainerPoint(coordinate: Coordinate, zoom?: number, out?: Point): Point;
coordinateToContainerPointAtRes(coordinate: Coordinate, res?: number, out?: Point): Point;
/**
* Convert a geographical coordinate to the container point.
* Batch conversion for better performance
* A container point is a point relative to map container's top-left corner.
* @param coordinates - coordinates
* @param zoom - zoom level
* @return {Point[]}
*/
coordinatesToContainerPoints(coordinates: Array, zoom?: number): Array;
/**
* Convert a geographical coordinate to the container point.
* Batch conversion for better performance
* A container point is a point relative to map container's top-left corner.
* @param coordinates - coordinates
* @param resolution - container points' resolution
* @return
*/
coordinatesToContainerPointsAtRes(coordinates: Array, res?: number): Array;
/**
* Converts a container point to geographical coordinate.
* @param * @param out - optional coordinate to receive result
* @return */
containerPointToCoordinate(containerPoint: Point, out?: Coordinate): Coordinate;
/**
* Converts a container point to geographical coordinate with altitude.
* @param containerPoint
* @param number
* @param altitude
* @param out
*/
containerPointToCoordinate3(containerPoint: Point, altitude?: number, out?: Coordinate): Coordinate;
/**
* Converts a container point extent to the geographic extent.
* @param containerExtent - containeproints extent
* @return geographic extent
*/
containerToExtent(containerExtent: PointExtent): Extent;
/**
* Converts geographical distances to the pixel length.
* The value varis with difference zoom level.
*
* @param xDist - distance on X axis.
* @param yDist - distance on Y axis.
* @return {Size} result.width: pixel length on X axis; result.height: pixel length on Y axis
*/
distanceToPixel(xDist: number, yDist: number, zoom?: number): Size;
/**
* Converts geographical distances to the 2d point length.
* The value varis with difference zoom level.
*
* @param xDist - distance on X axis.
* @param yDist - distance on Y axis.
* @param zoom - point's zoom
* @return */
distanceToPoint(xDist: number, yDist: number, zoom?: number, paramCenter?: Coordinate): Point;
/**
* Converts geographical distances to the 2d point length at specified resolution.
*
* @param xDist - distance on X axis.
* @param yDist - distance on Y axis.
* @param res - target resolution
* @return */
distanceToPointAtRes(xDist: number, yDist: number, res?: number, paramCenter?: Coordinate, out?: Point): Point;
/**
* Converts height/altitude to the 2d point
*
* @param altitude - the value of altitude,suche as: map.altitudeToPoint(100);
* @param res - target resolution
* @param [originCenter=null] - optional original coordinate for caculation
* @return */
altitudeToPoint(altitude: number, res?: number, originCenter?: Coordinate): number;
pointAtResToAltitude(point: Point, res?: number, originCenter?: Coordinate): number;
/**
* Converts pixel size to geographical distance.
*
* @param width - pixel width
* @param height - pixel height
* @return distance - Geographical distance
*/
pixelToDistance(width: number, height: number): number;
/**
* Converts 2d point distances to geographic length.
*
* @param dx - distance on X axis.
* @param dy - distance on Y axis.
* @param zoom - point's zoom
* @return distance
*/
pointToDistance(dx: number, dy: number, zoom?: number): number;
/**
* Converts 2d point distances to geographic length.
*
* @param dx - distance on X axis.
* @param dy - distance on Y axis.
* @param res - point's resolution
* @return distance
*/
pointAtResToDistance(dx: number, dy: number, res?: number, paramCenter?: Coordinate): number;
/**
* Computes the coordinate from the given pixel distance.
* @param coordinate - source coordinate
* @param px - pixel distance on X axis
* @param py - pixel distance on Y axis
* @return Result coordinate
*/
locateByPoint(coordinate: Coordinate, px: number, py: number): Coordinate;
/**
* Get map's extent in view points.
* @param zoom - zoom
* @return
*/
get2DExtent(zoom?: number, out?: PointExtent): PointExtent;
get2DExtentAtRes(res?: number, out?: PointExtent): PointExtent;
/**
* Converts a view point extent to the geographic extent.
* @param extent2D - view points extent
* @return geographic extent
*/
pointToExtent(extent2D: PointExtent): Extent;
/**
* When moving map, map's center is updated in real time, but platform will be moved in the next frame to keep syncing with other layers
* Get the offset in current frame and the next frame
* @return view point offset
*/
getViewPointFrameOffset(): Point | null;
/**
* transform view point to geographical projected coordinate
* @param viewPoint
* @param out - optional coordinate to receive result
* @return */
viewPointToPrj(viewPoint: Point, out?: Point): Point;
/**
* transform geographical projected coordinate to container point
* @param pCoordinate
* @param zoom target zoom
* @param out - optional point to receive result
*/
prjToContainerPoint(pCoordinate: Coordinate, zoom?: number, out?: Point, altitude?: number): Point;
prjToContainerPointAtRes(pCoordinate: Coordinate, res?: number, out?: Point, altitude?: number): Point;
/**
* transform geographical projected coordinate to view point
* @param pCoordinate
* @return */
prjToViewPoint(pCoordinate: Coordinate, out?: Point, altitude?: number): Point;
viewPointToPoint(viewPoint: Point, zoom?: number, out?: Point): Point;
pointToViewPoint(point: Point, zoom?: number, out?: Point): Point;
}
}
//# sourceMappingURL=Map.CoordTransform.d.ts.map