http://www.google.com/apis/maps/documentation/
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.
onstructor | Description |
---|---|
GTileLayerOverlay(tileLayer) | Creates a GOverlay that wraps the tileLayer. (Since 2.61) |
Methods | Return Value | Description |
---|---|---|
() | none | |
hide() | none | Hides this overlay so it is not visible, but maintains its position in the stack of overlays. (Since 2.71) |
show() | none | Shows a previously hidden TileLayerOverlay. (Since 2.71) |
http://never-ever.info/googlemaps/ver2/GTLO.html
二つ目の地図は赤いgif画像(#FFFFFF, 256x256)
三つ目の地図は黒いgif画像(#000000, 256x256)
四つ目の地図は256x256の画像を128x128のブロックで色分けしたもの
五つ目の地図は 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 "white_map_tile.gif";
};
tilelayer.getOpacity = function() {return 0.5;}
map.addOverlay(new GTileLayerOverlay(tilelayer));