GOverlay [interface]-GoogleMaps/API/doc/ClassReference/17-GOverlay-N☆E 学習帳

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

Counter: 3696, today: 2, yesterday: 2

GOverlay [interface]

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

Version 2 (2006.4) 新規

This interface is implemented by the GMarker, GPolyline, and GInfoWindow classes in the maps API library. You can implement it if you want to display custom types of overlay objects on the map. An instance of GOverlay can be put on the map with the method GMap2.addOverlay(). The map will then call the method GOverlay.initialize() on the overlay instance to display itself on the map initially. Whenever the map display changes, the map will call GOverlay.redraw() so that the overlay can reposition itself if necessary. The overlay instance can use the method GMap2.getPane() to get hold of one or more DOM container elements to attach itself to.

Constructor

Constructor Description
GOverlay() This constructor creates dummy implementations for the methods. Still, when inheriting from this class, your derived class constructor should call this constructor for completeness.

 

Static Methods

Static Methods Return Value Description
getZIndex(latitude) Number Returns a CSS z-index value for a given latitude. It computes a z index such that overlays further south are on top of overlays further north, thus creating the 3D appearance of marker overlays.

CSS での z-index は重ね合わせの順番指定
 

Abstract Methods

Abstract Methods Return Value Description
initialize(map) none Called by the map after the overlay is added to the map using GMap2.addOverlay(). The overlay object can draw itself into the different panes of the map that can be obtained using GMap2.getPane().
remove() none Called by the map after the overlay is removed from the map using GMap2.removeOverlay() or GMap2.clearOverlays(). The overlay must remove itself from the map panes here.
copy() GOverlay Returns an uninitialized copy of itself that can be added to the map.
redraw(force) none Called by the map when the map display has changed. The argument force will be true if the zoom level or the pixel offset of the map view has changed, so that the pixel coordinates need to be recomputed.