GPoint [class]-GoogleMaps/API/doc/ClassReference/11-GPoint-N☆E 学習帳

[ リロード ]   [ ソース ]  [ トップ | 一覧 | 単語検索 | 最新 | バックアップ | ヘルプ ]

Counter: 3074, today: 2, yesterday: 3

GPoint [class]

http://www.google.com/apis/maps/docu­mentation/

Version 2 (2006.4)

A GPoint represents a point on the map by its pixel coordinates. Notice that in v2, it doesn't represent a point on the earth by its geographical coordinates anymore. Geographical coordinates are now represented by GLatLng.

In the map coordinate system, the x coordinate increases to the left, and the y coordinate increases downwards.

Notice that while the two parameters of a GPoint are accessible as properties x and y, it is better to never modify them, but to create a new object with different paramaters instead.

Constructor

Constructor Description
GPoint(x, y) Creates a GPoint object.

 

Properties

Properties Type Description
x Number x coordinate, increases to the left.
y Number y coordinate, increases downwards.

 

Methods

Methods Return Value Description
equals(other) Boolean Returns true iff the other point has equal coordinates.
toString() String Returns a string that contains the x and y coordinates, in this order, separated by a comma.

 

Version 1

A GPoint represents a single, 2-dimensional coordinate. If a GPoint represents a lat/lng, x is the longitude, and y is the latitude in decimal notation.

Constructor

Constructor Description
GPoint(x, y) Creates a new point with the given coordinate values

 

Properties

Property Description
x The x (or horizontal) coordinate of the point
y The y (or vertical) coordinate of the point