giving Layer.Google.v3 an animationEnabled option, like the one we already have for Layer.VirtualEarth. r=bartvde (closes #3020)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11047 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -19,6 +19,8 @@
|
||||
</p>
|
||||
<div id="map" class="smallmap"></div>
|
||||
<div id="docs">
|
||||
<p><input id="animate" type="checkbox" checked="checked">Animated
|
||||
zoom (if supported by GMaps on your device)</input></p>
|
||||
<p>
|
||||
If you use the Google Maps v3 API with a Google layer, you don't
|
||||
need to include an API key. This layer only works in the
|
||||
|
||||
@@ -29,4 +29,12 @@ function init() {
|
||||
new OpenLayers.Projection("EPSG:4326"),
|
||||
map.getProjectionObject()
|
||||
), 5);
|
||||
|
||||
// add behavior to html
|
||||
var animate = document.getElementById("animate");
|
||||
animate.onclick = function() {
|
||||
for (var i=map.layers.length-1; i>=0; --i) {
|
||||
map.layers[i].animationEnabled = this.checked;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user