GoogleMaps/API/doc/ClassReference/46-GMarkerManager の変更点-N☆E 学習帳

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


// author:1
// author_ucd:dJFfGfMi5Y0U wye
*GMarkerManager [class]
http://www.google.com/apis/maps/documentation/


**Version2 (&font(Red){2006.11新規};)

>This class is used to manage visibility of hundreds of markers on a map, based on the map's current viewport and zoom level.

***Constructor
|TLEFT:97%||c
|Constructor |Description|h
|GMarkerManager(map, opts?) |Creates a new marker manager that controlls visibility of markers for the specified map. (Since 2.67)|
|GMarkerManager(map, opts?) |Creates a new marker manager that controlls visibility of markers for the specified map. (Since &font(Fuchsia){2.67};)|

***Methods
|TLEFT:97%||c
|addMarkers(markers, minZoom, maxZoom?) |none |Adds a batch of markers to this marker manager. The markers are not added to the map, until the refresh() method is called. Once placed on a map, the markers are shown if they fall within the map's current viewport and the map's zoom level is greater than or equal to the specified minZoom. If the maxZoom was given, the markers are automatically removed if the map's zoom is greater than the one specified. (Since 2.67)|
|addMarker(marker, minZoom, maxZoom?) |none |Adds a single marker to a collection of markers controlled by this manager. If the marker's location falls within the map's current viewport and the map's zoom level is within the specified zoom level rage, the marker is immediately added to the map. Similar to the addMarkers method, the minZoom and the optional maxZoom parameters specify the range of zoom levels at which the marker is shown. (Since 2.67)|
|refresh() |none |Forces the manager to update markers shown on the map. This method must be called if markers were added using the addMarkers method. (Since 2.67)|
|getMarkerCount(zoom) |Number |Returns the total number of markers potentially visible at the given zoom level. This may include markers at lower zoom levels. (Since 2.67)|
|Methods |Return Value |Description|h
|addMarkers(markers, minZoom, maxZoom?) |none |Adds a batch of markers to this marker manager. The markers are not added to the map, until the refresh() method is called. Once placed on a map, the markers are shown if they fall within the map's current viewport and the map's zoom level is greater than or equal to the specified minZoom. If the maxZoom was given, the markers are automatically removed if the map's zoom is greater than the one specified. (Since &font(Fuchsia){2.67};)|
|addMarker(marker, minZoom, maxZoom?) |none |Adds a single marker to a collection of markers controlled by this manager. If the marker's location falls within the map's current viewport and the map's zoom level is within the specified zoom level rage, the marker is immediately added to the map. Similar to the addMarkers method, the minZoom and the optional maxZoom parameters specify the range of zoom levels at which the marker is shown. (Since &font(Fuchsia){2.67};)|
|refresh() |none |Forces the manager to update markers shown on the map. This method must be called if markers were added using the addMarkers method. (Since &font(Fuchsia){2.67};)|
|getMarkerCount(zoom) |Number |Returns the total number of markers potentially visible at the given zoom level. This may include markers at lower zoom levels. (Since &font(Fuchsia){2.67};)|

***Events
|TLEFT:97%||c
|Events |Arguments |Description|h
|changed |bounds, markerCount |This event is fired when markers managed by a manager have been added to or removed from the map. The event handler function should be prepared to accept two arguments. The fist one is the rectangle definining the bounds of the visible grid. The second one carries the number of markers currently shown on the map.|