Class GeoProjection

GeoProjection 地理坐标投影.

Example:

const mapExtent = new GeoBounds(new GeoPoint(10, 20), new GeoPoint(80, 90));
const prj = new GeoProjection(mapExtent);
const pt = [30, 30];
const latlng = prj.toLngLat(pt);
const pt_geo = prj.fromLngLat(latlng);
const mkt = prj.toMercator(pt);
const pt_mkt = prj.fromMercator(mkt);

Hierarchy (view full)

Constructors

Properties

mapExtent: GeoBounds

地图地理范围.

EARTH_BOUNDS: [number, number, number, number] = ...

The equatorial semi perimeter in meters.

EQUATORIAL_SEMIPERIMETER: number = 20037508.3427892

The equatorial semi perimeter in meters.

Methods

  • 墨卡托(epsg:3857)转坐标

    Parameters

    Returns [number, number]

  • 把米转化为距离

    Parameters

    • meter: number

    Returns number

  • 设置地图范围

    Parameters

    Returns void

    Extent

    extent - 地图地理范围.

  • 把距离转化为米

    Parameters

    • dist: number

    Returns number