<div dir="ltr">Google Maps is integrated using the GMaps API, and there we cannot control zoom animation. Your best bet is to turn off zoom animation for the map by configuring your map with<div><br></div><div style>    zoomMethod: null</div>
<div style><br></div><div style>Then you can also activate the OpenLayers hack to remove the GMaps animation by turning the layer off during zooming. To do so, configure your Google layer with</div><div style><br></div><div style>
    animationEnabled: false</div><div style><br></div><div style>Andreas.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jun 17, 2013 at 6:54 PM, Jeff Heard <span dir="ltr"><<a href="mailto:jefferson.r.heard@gmail.com" target="_blank">jefferson.r.heard@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I'm stuck. My code works with OSM, but I need it to work with Google as well.  The problem is simply that Google v3 and my other layers are not playing well together at all.  They don't zoom together.  <div>


<br></div><div>In the case of Google satellite, the layer doesn't zoom at all unless I pan the map.  In the case of the others (hybrid, terrain, roads), they zoom, but the google layer and the other layers on the map zoom up to half a second apart from each other, and the layer "drifts" between zoom levels somewhat.  </div>


<div><br></div><div>The code that reproduces this is simple and derived directly from the WMS and Google v3 examples, but they appear not to work together well:</div><div><br></div><div><table><tbody><tr>

<td>$(function() {</td></tr><tr><td></td><td>            var in_options = {</td></tr><tr><td></td><td>                internalProjection: new OpenLayers.Projection('EPSG:900913'),</td>

</tr><tr><td></td><td>                externalProjection: new OpenLayers.Projection("EPSG:4326")</td></tr><tr><td></td><td>            };</td></tr><tr><td></td><td>

<br></td></tr><tr><td></td><td>            var wkt = new OpenLayers.Format.WKT(in_options);</td></tr><tr><td></td><td>            var feature = wkt.read("POLYGON ((-78.9950752916525687 35.5198238058974169, -78.9950752916525687 36.0750238562958074, -78.2565296570171398 36.0750238562958074, -78.2565296570171398 35.5198238058974169, -78.9950752916525687 35.5198238058974169))");</td>


</tr><tr><td></td><td>            var bounds = feature.geometry.getBounds();</td></tr><tr><td></td><td><br></td></tr><tr><td></td><td>            var wms = new OpenLayers.Layer.WMS('Zoning', "/ga_resources/wms/", {</td>


</tr><tr><td></td><td><br></td></tr><tr><td></td><td>                </td></tr><tr><td></td><td>                styles: "styles/new-style",</td></tr><tr><td>

</td><td>                </td></tr><tr><td></td><td>                layers: "catalog/states/nc/counties/wake/zoning",</td></tr><tr><td></td><td>                transparent: true</td>

</tr><tr><td></td><td>            });</td></tr><tr><td></td><td><br></td></tr><tr><td></td><td>            var map = new OpenLayers.Map({ div:'map', projection: new OpenLayers.Projection("EPSG:900913")});</td>


</tr><tr><td></td><td><br></td></tr><tr><td></td><td>            var layers = [</td></tr><tr><td></td><td>                new OpenLayers.Layer.Google(</td></tr><tr><td>

</td><td>                        "Google Physical",</td></tr><tr><td></td><td>                        {type: google.maps.MapTypeId.TERRAIN}</td></tr><tr><td></td><td>

                ),</td></tr><tr><td></td><td>                new OpenLayers.Layer.Google(</td></tr><tr><td></td><td>                        "Google Streets", // the default</td>

</tr><tr><td></td><td>                        {numZoomLevels: 20}</td></tr><tr><td></td><td>                ),</td></tr><tr><td></td><td>                new OpenLayers.Layer.Google(</td>

</tr><tr><td></td><td>                        "Google Hybrid",</td></tr><tr><td></td><td>                        {type: google.maps.MapTypeId.HYBRID, numZoomLevels: 20}</td></tr>

<tr><td></td><td>                ),</td></tr><tr><td></td><td>                new OpenLayers.Layer.Google(</td></tr><tr><td></td><td>                        "Google Satellite",</td>

</tr><tr><td></td><td>                        {type: google.maps.MapTypeId.SATELLITE, numZoomLevels: 22}</td></tr><tr><td></td><td>                ),</td></tr><tr><td></td><td>

                wms</td></tr><tr><td></td><td>            ];</td></tr><tr><td></td><td><br></td></tr><tr><td></td><td>            map.addLayers(layers);</td></tr><tr>
<td>
</td><td></td></tr><tr><td></td><td>            //map.addLayers([wms]);</td></tr><tr><td></td><td>            map.addControl(new OpenLayers.Control.LayerSwitcher());</td></tr>
<tr>
<td></td><td>            map.zoomToExtent(bounds);</td></tr><tr><td></td><td><br></td></tr><tr><td></td><td>        });</td></tr></tbody></table></div></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Andreas Hocevar<br>OpenGeo - <a href="http://opengeo.org/">http://opengeo.org/</a><br>Expert service straight from the developers.<br>
</div>