Skip to content

TileOverlay

wf9a5m75 edited this page Feb 13, 2014 · 14 revisions

###Add a TileOverlay A tile overlay is an image that is fixed to a map. To add an image, call addTileOverlay() method. The map.addTileOverlay() method takes a single overlay options object literal, specifying the initial properties of the tile overlay.

The following fields are available when constructing a ground overlay:

Field Name Type Description
url String The url of the tile image. You must include <x>,<y> and <zoom> strings into your URL.
visible Boolean false if you want to hide the ground overlay.
zIndex Number Specify the zIndex.
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) Boolean Set false if you want to hide.
setZIndex(Number) void Set the zIndex of the tile overlay.
getZIndex() Number Return 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