标签:
OpenLayers.Control.YourControl = OpenLayers.Class(OpenLayers.Control, { // may private properties here ... initialize: function(options) { OpenLayers.Control.prototype.initialize.apply(this, arguments); // initialize private settings here ... }, draw: function() { OpenLayers.Control.prototype.draw.apply(this); // add private elements here ... return this.div; }, destroy: function() { // delete private elements here ... OpenLayers.Control.prototype.destroy.apply(this); }, // may event handlers here ... CLASS_NAME: "OpenLayers.Control.YourControl" });
标签:
原文地址:http://www.cnblogs.com/sparkbj/p/5808048.html