// author:1
*GTileLayerOverlay [class]
http://www.google.com/apis/maps/documentation/
**Version2 (&font(Red){2006.8新規};)
>A GTileLayerOverlay augments the map with a GTileLayer. It implements the GOverlay interface and thus is added to the map using the GMap2.addOverlay() method. The GTileLayer is presented on top of the existing map imagery - to replace the imagery instead, put the GTileLayer inside a custom GMapType.
***Constructor
|TLEFT:97%||c
|onstructor |Description|h
|GTileLayerOverlay(tileLayer) |Creates a GOverlay that wraps the tileLayer. (Since 2.61)|
***Methods &font(Red){(2007.1追加)};
|TLEFT:97%||c
|Methods |Return Value |Description|h
|() |none ||
|hide() |none |Hides this overlay so it is not visible, but maintains its position in the stack of overlays. (&font(Fuchsia){Since 2.71};)|
|show() |none |Shows a previously hidden TileLayerOverlay. (&font(Fuchsia){Since 2.71};)|
****サンプル
http://never-ever.info/googlemaps/ver2/GTLO.html
二つ目の地図は赤いgif画像(#FFFFFF, 256x256)~
三つ目の地図は黒いgif画像(#000000, 256x256)~
四つ目の地図は256x256の画像を128x128のブロックで色分けしたもの~
五つ目の地図は http://never-ever.info/googlemaps/ver2/mi.gif 80x80の画像(256x256に拡大表示されるようです)
上記の画像を設定し、不透明度を 0.5(50%)で表示したものです。
↓一つ目の地図のコード
>var map = new GMap2( document.getElementById( "map" ) );~
var center = new GLatLng(37.4419, -122.1419);~
map.setCenter( center , 13);~
var tilelayer = new GTileLayer( new GCopyrightCollection(), 0, 17 );~
tilelayer.getTileUrl = function( tile , zoom ) {~
return "http://kml.lover.googlepages.com/white_map_tile.gif";~
};~
tilelayer.getOpacity = function() {return 0.5;}~
map.addOverlay(new GTileLayerOverlay(tilelayer));