Class IWCoordinate

Extends IWClonable.

A class representing a coordinate.


Constructor Summary
IWCoordinate(x, y, projection)
            Creates a new coordinate. If x and y are not specified (0, 0) is returned.
 
Method Summary
 IWCoordinate clone()
           Returns a new instance of this object.
 number distanceFrom(other)
           Returns the distance between this coordinate and another one in meters.
 boolean equals(other)
           Checks whether this coordinate equals another one (or is very close to it, i.e.
 String getProjectionType()
           Returns the projection type.
 number getX()
           Returns the horizontal position of this coordinate.
 number getY()
           Returns the vertical position of this coordinate in meters.
 void setProjectionType(projectionType)
           Sets the projection type.
 void setX(x)
           Sets the horizontal position of this coordinate.
 void setY(y)
           Sets the vertical position of this coordinate in meters.
 String toFormattedString()
           Returns a compact string representation of this coordinate. For WGS84 coordinates this is latitude, longitude (e.g. in all other cases x, y (e.g. "794920, 6568663").
 IWCoordinate toMercator()
           Projects the coordinate to Mercator. Returns a copy of the coordinate if it already is in Mercator.
 String toString()
           Returns a string representation of this coordinate.
 IWCoordinate toWGS84()
           Projects the coordinate to WGS 84. Returns a copy of the coordinate if it already is in WGS 84.
 
Constructor Detail

IWCoordinate

IWCoordinate(x, y, projection)

Method Detail

clone

IWCoordinate clone()

distanceFrom

number distanceFrom(other)

equals

boolean equals(other)

getProjectionType

String getProjectionType()

getX

number getX()

getY

number getY()

setProjectionType

void setProjectionType(projectionType)

setX

void setX(x)

setY

void setY(y)

toFormattedString

String toFormattedString()

toMercator

IWCoordinate toMercator()

toString

String toString()

toWGS84

IWCoordinate toWGS84()

Source-Code Copyright 2007-2016 infoware GmbH - Documentation generated on Tue Nov 29 2022 14:20:15 GMT+0100 (MEZ)