码迷,mamicode.com
首页 > 其他好文 > 详细

Openlayers 自定义控件

时间:2016-08-25 20:24:55      阅读:391      评论:0      收藏:0      [点我收藏+]

标签:

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"
 
});

 

Openlayers 自定义控件

标签:

原文地址:http://www.cnblogs.com/sparkbj/p/5808048.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!