tileOverlay.setFadeIn()
April 20, 2019 ยท View on GitHub
:warning: This document is aim for older versions (from 2.3.0 to 2.5.3). Document for new version is https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/blob/master/v2.6.0/README.md
tileOverlay.setFadeIn()
Set whether the tiles should fade in.
tileOverlay.setFadeIn(flag);
Parameters
| name | type | description |
|---|---|---|
| flag | boolean | true: fadeIn, false: no-fadeIn |
Demo code
<div id="map_canvas">
<span class="smallPanel"><input type="checkbox" id="toggleCheckbox" checked="checked">tileoverlay.setFadeIn(true)</span>
</div>
var mapDiv = document.getElementById("map_canvas");
var map = plugin.google.maps.Map.getMap(mapDiv);
// Add a tile overlay
var tileOverlay = map.addTileOverlay({
// <x>,<y> and <zoom> are replaced with values
// (i.e. http://tile.stamen.com/toner/2/1/2.png)
getTile: function(x, y, zoom) {
return "http://tile.stamen.com/toner/" + zoom + "/" + x + "/" + y + ".png";
}
});
var checkbox = document.getElementById("toggleCheckbox");
checkbox.addEventListener("change", function() {
// Change the fadeIn property
tileOverlay.setFadeIn(checkbox.checked);
});
