2011-04-11 20:49:15 +08:00
|
|
|
|
2012-02-14 17:40:47 +08:00
|
|
|
L.Control = L.Class.extend({
|
|
|
|
options: {
|
|
|
|
position: 'topright'
|
|
|
|
},
|
|
|
|
|
|
|
|
initialize: function (options) {
|
|
|
|
L.Util.setOptions(this, options);
|
|
|
|
},
|
|
|
|
|
|
|
|
getPosition: function () {
|
|
|
|
return this.options.position;
|
|
|
|
},
|
|
|
|
|
|
|
|
setPosition: function (position) {
|
|
|
|
this.options.position = position;
|
|
|
|
|
|
|
|
if (this._map) {
|
|
|
|
this._map.removeControl(this);
|
|
|
|
this._map.addControl(this);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
2011-04-11 20:49:15 +08:00
|
|
|
|