Files
openlayers/lib/OpenLayers/Layer/Google.js
crschmidt c0ec7f9a00 Change @require to @require:
git-svn-id: http://svn.openlayers.org/trunk/openlayers@326 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
2006-05-24 17:17:22 +00:00

20 lines
557 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()
);
}
});