// mapmanager.js // Managing a GMap state. var MAP_SCROLL_SPEED = 0.000006; function MapManager(map) { this.map = map; this.centerX = 139.745375; this.centerY = 35.658020; this.bounds; this.velX = 0; this.velY = MAP_SCROLL_SPEED; this.map.centerAndZoom(new GPoint(this.centerX, this.centerY), 0); this.bounds = this.map.getBoundsLatLng(); this.map.addControl(new GMapTypeControl()); this.map.setMapType(G_SATELLITE_TYPE); this.map.disableDragging(); this.map.disableInfoWindow(); this.update = function() { this.centerX += this.velX; this.centerY += this.velY; //this.map.centerAtLatLng(new GPoint(this.centerX, this.centerY)); this.map.recenterOrPanToLatLng(new GPoint(this.centerX, this.centerY)); this.bounds = this.map.getBoundsLatLng(); } }