if zoom hasnt changed, use PanToLatLong() instead of setCenter()

git-svn-id: http://svn.openlayers.org/trunk/openlayers@1231 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-08-16 05:59:37 +00:00
parent 208957ade6
commit 7e312bf596

View File

@@ -41,12 +41,17 @@ OpenLayers.Layer.VirtualEarth.prototype =
if (this.vemap != null) {
var olCenter = this.map.getCenter();
var olZoom = this.map.getZoom();
var veCenter = this.getVELatLongFromOLLonLat(olCenter);
var veZoom = this.getVEZoomFromOLZoom(olZoom);
this.vemap.SetCenterAndZoom(veCenter, veZoom);
if (zoomChanged) {
var olZoom = this.map.getZoom();
var veZoom = this.getVEZoomFromOLZoom(olZoom);
this.vemap.SetCenterAndZoom(veCenter, veZoom);
} else {
this.vemap.PanToLatLong(veCenter);
}
}
},
@@ -55,6 +60,7 @@ OpenLayers.Layer.VirtualEarth.prototype =
*
*/
loadVEMap:function() {
// create div and set to same size as map
var veDiv = OpenLayers.Util.createDiv(this.name);
var sz = this.map.getSize();