bcgis-type
Version:
The SDK is based on Cesium for secondary development of 2, 3D all-in-one WebGis application framework, the framework optimizes the use of Cesium and add some additional features, designed for developers to quickly build WebGis applications.
145 lines (144 loc) • 3.42 kB
TypeScript
declare class BaiduMercatorProjection {
isWgs84: boolean;
constructor();
/**
*
* @param point1
* @param point2
* @returns {number}
*/
getDistanceByMC(point1: any, point2: any): number;
/**
* Calculate the distance between two points according to the latitude and longitude coordinates
* @param point1
* @param point2
* @returns {number|*}
*/
getDistanceByLL(point1: any, point2: any): number;
/**
* The plane cartesian coordinates are converted to latitude and longitude coordinates
* @param point
* @returns {Point|{lng: number, lat: number}}
*/
convertMC2LL(point: any): {
lng: any;
lat: any;
};
/**
* The latitude and longitude coordinates are converted to plane cartesian coordinates
* @param point
* @returns {{lng: number, lat: number}|*}
*/
convertLL2MC(point: any): any;
/**
*
* @param fromPoint
* @param factor
* @returns {{lng: *, lat: *}}
*/
convertor(fromPoint: any, factor: any): {
lng: any;
lat: any;
};
/**
*
* @param x1
* @param x2
* @param y1
* @param y2
* @returns {number}
*/
getDistance(x1: any, x2: any, y1: any, y2: any): number;
/**
*
* @param deg
* @returns {number}
*/
toRadians(deg: any): number;
/**
*
* @param rad
* @returns {number}
*/
toDegrees(rad: any): number;
/**
*
* @param v
* @param a
* @param b
* @returns {number}
*/
getRange(v: any, a: any, b: any): any;
/**
*
* @param v
* @param a
* @param b
* @returns {*}
*/
getLoop(v: any, a: any, b: any): any;
/**
*
* @param point
* @returns {{lng: number, lat: number}|*}
*/
lngLatToMercator(point: any): any;
/**
*
* @param point
* @returns {{x: (number|*), y: (number|*)}}
*/
lngLatToPoint(point: any): {
x: any;
y: any;
};
/**
* WebMercator transforms to latitude and longitude
* @param point
* @returns {Point|{lng: number, lat: number}}
*/
mercatorToLngLat(point: any): {
lng: any;
lat: any;
};
/**
*
* @param point
* @returns {Point|{lng: number, lat: number}}
*/
pointToLngLat(point: any): {
lng: any;
lat: any;
};
/**
* Latitude and longitude coordinates transforms to pixel coordinates
* @param point
* @param zoom
* @param mapCenter
* @param mapSize
* @returns {{x: number, y: number}}
*/
pointToPixel(point: any, zoom: any, mapCenter: any, mapSize: any): {
x: number;
y: number;
};
/**
* Pixel coordinates transforms to latitude and longitude coordinates
* @param pixel
* @param zoom
* @param mapCenter
* @param mapSize
* @returns {Point|{lng: number, lat: number}}
*/
pixelToPoint(pixel: any, zoom: any, mapCenter: any, mapSize: any): {
lng: any;
lat: any;
};
/**
*
* @param zoom
* @returns {number}
*/
getZoomUnits(zoom: any): number;
}
export default BaiduMercatorProjection;