Android

com.google.android.maps.GeoPoint

java.lang.Object
com.google.android.maps.GeoPoint

An immutable class representing a pair of latitude and longitude, stored as integer numbers of microdegrees.

Summary

Public Constructors

            GeoPoint(int latitudeE6, int longitudeE6)
Constructs a GeoPoint with the given latitude and longitude, measured in microdegrees (degrees * 1E6).

Public Methods

          boolean  equals(Object object)
Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison.
          int  getLatitudeE6()
Returns the latitude of this GeoPoint in microdegrees (degrees * 1E6).
          int  getLongitudeE6()
Returns the longitude of this GeoPoint in microdegrees (degrees * 1E6).
          int  hashCode()
Returns an integer hash code for the receiver.
          String  toString()
Returns a string containing a concise, human-readable description of the receiver.
Methods inherited from class java.lang.Object

Details

Public Constructors

public GeoPoint(int latitudeE6, int longitudeE6)

Constructs a GeoPoint with the given latitude and longitude, measured in microdegrees (degrees * 1E6).

Parameters

latitudeE6 The point's latitude. This will be clamped to between -80 degrees and +80 degrees inclusive, in order to maintain accuracy in the Mercator projection.
longitudeE6 The point's longitude. This will be normalized to be greater than -180 degrees and less than or equal to +180 degrees.

Public Methods

public boolean equals(Object object)

Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison. The implementation in Object returns true only if the argument is the exact same object as the receiver (==).

Parameters

object Object the object to compare with this object.

Returns

  • boolean true if the object is the same as this object false if it is different from this object.

public int getLatitudeE6()

Returns the latitude of this GeoPoint in microdegrees (degrees * 1E6).

Returns

  • The latitude.

public int getLongitudeE6()

Returns the longitude of this GeoPoint in microdegrees (degrees * 1E6).

Returns

  • The longitude.

public int hashCode()

Returns an integer hash code for the receiver. Any two objects which answer true when passed to .equals must answer the same value for this method.

Returns

  • int the receiver's hash.

public String toString()

Returns a string containing a concise, human-readable description of the receiver.

Returns

  • String a printable representation for the receiver.
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:48