git-svn-id: http://svn.openlayers.org/trunk/openlayers@326 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
20 lines
557 B
JavaScript
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()
|
|
);
|
|
}
|
|
|
|
});
|