Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "proj/gcj02"

Index

Variables

Const CODE

CODE: string = "GCJ02"

default code of gcj02, used as identifier of gcj02

const

Const EXTENT

EXTENT: Extent = [73.62, 18.11, 134.77, 53.56]

extent of gcj02

const

Const METERS_PER_UNIT

METERS_PER_UNIT: number = (Math.PI * RADIUS) / 180

coefficient between degree and radian

const

Const PROJECTIONS

PROJECTIONS: GCJ02Projection[] = [new GCJ02Projection(CODE),new GCJ02Projection('GCJ:02'),new GCJ02Projection('ZH:MARS')]

all code of GCJ02Projection, 'GCJ02', 'GCJ:02' and 'ZH:MARS'

const

Const RADIUS

RADIUS: number = 6378137

radius of WGS84 ellipsoid

const

Functions

addGcj02

  • addGcj02(): void
  • add gcj02 and its transformations to openlayers it is added when this module is imported automatically

    function

    Returns void

delta

  • delta(coord: number[]): number[]

fromEPSG3857

  • fromEPSG3857(input: number[], opt_output: number[], opt_dimension: number): number[]
  • transform coordinate from EPSG:3857 to GCJ02

    function

    Parameters

    • input: number[]

      input coordinate

    • opt_output: number[]

      output coordinate

    • opt_dimension: number

      dimension of coordinate

    Returns number[]

    tranformed coordinate

fromEPSG4326

  • fromEPSG4326(input: number[], opt_output: number[], opt_dimension: number): number[]
  • transform coordinate from EPSG:4326 to GCJ02

    function

    Parameters

    • input: number[]

      input coordinate

    • opt_output: number[]

      output coordinate

    • opt_dimension: number

      dimension of coordinate

    Returns number[]

    tranformed coordinate

gcj02WGSExactly

  • gcj02WGSExactly(coord: number[]): number[]
  • transform coordinate from GCJ02 to EPSG:4326, this algorithm is more precise.

    function

    Parameters

    • coord: number[]

      coordinate

    Returns number[]

    tranformed coordinate

gcj2WGS

  • gcj2WGS(coord: number[]): number[]
  • transform coordinate from GCJ02 to EPSG:4326

    function

    Parameters

    • coord: number[]

      coordinate

    Returns number[]

    tranformed coordinate

outOfChina

  • outOfChina(coord: number[]): boolean
  • whether a coordinate is nout of area of china

    Parameters

    • coord: number[]

      the coordinate

    Returns boolean

    whether is out of china

toEPSG3857

  • toEPSG3857(input: number[], opt_output: number[], opt_dimension: number): number[]
  • transform coordinate from GCJ02 to EPSG:3857

    function

    Parameters

    • input: number[]

      input coordinate

    • opt_output: number[]

      output coordinate

    • opt_dimension: number

      dimension of coordinate

    Returns number[]

    tranformed coordinate

toEPSG4326

  • toEPSG4326(input: number[], opt_output: number[], opt_dimension: number): number[]
  • transform coordinate from GCJ02 to EPSG:4326

    function

    Parameters

    • input: number[]

      input coordinate

    • opt_output: number[]

      output coordinate

    • opt_dimension: number

      dimension of coordinate

    Returns number[]

    tranformed coordinate

transformLat

  • transformLat(x: number, y: number): number

transformLon

  • transformLon(x: number, y: number): number

wgs2GCJ

  • wgs2GCJ(coord: number[]): number[]
  • transform coordinate from EPSG:4326 to GCJ02

    function

    Parameters

    • coord: number[]

      coordinate

    Returns number[]

    tranformed coordinate

Generated using TypeDoc