Class LonLat

Index

Constructor methods

Methods

Constructor methods

constructor(lon: number, lat: number): LonLat

Create a new map location. Coordinates can be passed either as two arguments, or as a single argument.

Parameters

  • lon: number
  • lat: number

Returns

LonLat

constructor(lonlat: Array<number>): LonLat

Create a new map location. Coordinates can be passed either as two arguments, or as a single argument.

Parameters

  • lonlat: Array<number>

Returns

LonLat

Methods

public add(lon: number, lat: number): LonLat

A new OpenLayers.LonLat object with the lon and lat passed-in added to this’s.

Parameters

  • lon: number
  • lat: number

Returns

LonLat

public clone(): LonLat

New OpenLayers.LonLat object with the same lon and lat values

Returns

LonLat

public equals(ll: LonLat): boolean

Boolean value indicating whether the passed-in OpenLayers.LonLat object has the same lon and lat components as this. Note: if ll passed in is null, returns false.

Parameters

Returns

boolean

public toShortString(): string

Shortened String representation of OpenLayers.LonLat object.

Returns

string

public transform(source: Projection, dest: Projection): LonLat

Transform the LonLat object from source to dest. This transformation is in place: if you want a new lonlat, use .clone() first.

Parameters

Returns

LonLat

public wrapDateLine(maxExtend: Bounds): LonLat

Returns a copy of this lonlat, but wrapped around the "dateline" (as specified by the borders of maxExtent).

Parameters

Returns

LonLat