Skip to content

TileOverlay

Masashi Katsumata edited this page Mar 27, 2015 · 14 revisions

###Add a TileOverlay A Tile Overlay is a set of images which are displayed on top of the base map tiles. These tiles are displayed like the base map tiles, but you can set the opacity of the tiles.

To add a tileOverlay, call addTileOverlay() method. The map.addTileOverlay() method takes a single overlay options object literal, specifying the initial properties of the tile overlay.

The following properties are available when constructing a TileOverlay:

Field Name Type Description
tileUrlFormat String The url of the tile images. You must include <x>,<y> and <zoom> strings into the URL format.
visible Boolean false if you want to hide the ground overlay.
zIndex Number Specify the zIndex. (Default: 0)
tileSize Number Specify the tile image size. (Default: 256)
map.addTileOverlay({
  // <x>,<y> and <zoom> are replaced with values
  tileUrlFormat: "http://tile.stamen.com/watercolor/<zoom>/<x>/<y>.jpg"
}, function(tileOverlay) {
  mTileOverlay = tileOverlay;
  map.showDialog();
});

image


TileOverlay Class Reference

Method Return value Description
getVisible() Boolean Return true if the tile overlay is visible.
setVisible(Boolean) void Set false if you want to hide.
getFadeIn() Boolean Get whether the tiles should fade in.
setFadeIn(Boolean) void Set whether the tiles should fade in.
getZIndex() Number Return the zIndex of the tile overlay.
setZIndex(Number) void Set the zIndex of the tile overlay.
clearTileCache() void Remove the tile cache.
remove() void Remove the tile overlay.

Join the official community

New versions will be announced through the official community. Stay tune!

Do you have a question or feature request?

Feel free to ask me on the issues tracker.

Or on the official community is also welcome!


New version 2.0-beta2 is available.

The cordova-googlemaps-plugin v2.0 has more faster, more features.

https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/tree/master/v2.0.0/README.md

Clone this wiki locally