Files
openlayers/lib/OpenLayers/Layer/Google.js
crschmidt 9190dd18d2 Add @require pragma to all source files.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@277 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-23 15:20:31 +00:00

20 lines
556 B
JavaScript

// @require OpenLayers/Layer.js
OpenLayers.Layer.Google = Class.create();
OpenLayers.Layer.Google.prototype = Object.extend( new OpenLayers.Layer(), {
// gmap stores the Google Map element
gmap:null,
initialize: function(name) {
OpenLayers.Layer.prototype.initialize.apply(this, [name]);
this.gmap = new GMap2(this.div);
},
moveTo: function() {
center = this.map.getCenter();
this.gmap.setCenter(
new GLatLng(center.lat, center.lon),
this.map.getZoom()
);
}
});