make sure vemap is loaded before trying to move it

git-svn-id: http://svn.openlayers.org/trunk/openlayers@606 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
euzuro
2006-06-17 12:06:06 +00:00
parent 836b47c192
commit 1df168849e

View File

@@ -42,11 +42,13 @@ OpenLayers.Layer.VirtualEarth.prototype =
*/
moveTo:function(bounds,zoomChanged) {
var olCenter = this.map.getCenter();
var olZoom = this.map.getZoom();
this.vemap.SetCenterAndZoom(new VELatLong(olCenter.lat, olCenter.lon),
olZoom + 1);
if (this.vemap != null) {
var olCenter = this.map.getCenter();
var olZoom = this.map.getZoom();
this.vemap.SetCenterAndZoom(new VELatLong(olCenter.lat, olCenter.lon),
olZoom + 1);
}
},