Sha256: d2468174853f6c25ea1d3b18dc81bca0a23d25787399d29adea11d7ac7c41a23

Contents?: true

Size: 1.71 KB

Versions: 4

Compression:

Stored size: 1.71 KB

Contents

//>>built
define("dojox/geo/openlayers/Layer",["dojo/_base/declare","dojo/_base/lang","dojo/_base/array","dojo/_base/sniff","./Feature"],function(_1,_2,_3,_4,_5){
return _1("dojox.geo.openlayers.Layer",null,{constructor:function(_6,_7){
var ol=_7?_7.olLayer:null;
if(!ol){
ol=_2.delegate(new OpenLayers.Layer(_6,_7));
}
this.olLayer=ol;
this._features=null;
this.olLayer.events.register("moveend",this,_2.hitch(this,this.moveTo));
},renderFeature:function(f){
f.render();
},getDojoMap:function(){
return this.dojoMap;
},addFeature:function(f){
if(_2.isArray(f)){
_3.forEach(f,function(_8){
this.addFeature(_8);
},this);
return;
}
if(this._features==null){
this._features=[];
}
this._features.push(f);
f._setLayer(this);
},removeFeature:function(f){
var ft=this._features;
if(ft==null){
return;
}
if(f instanceof Array){
f=f.slice(0);
_3.forEach(f,function(_9){
this.removeFeature(_9);
},this);
return;
}
var i=_3.indexOf(ft,f);
if(i!=-1){
ft.splice(i,1);
}
f._setLayer(null);
f.remove();
},removeFeatureAt:function(_a){
var ft=this._features;
var f=ft[_a];
if(!f){
return;
}
ft.splice(_a,1);
f._setLayer(null);
f.remove();
},getFeatures:function(){
return this._features;
},getFeatureAt:function(i){
if(this._features==null){
return undefined;
}
return this._features[i];
},getFeatureCount:function(){
if(this._features==null){
return 0;
}
return this._features.length;
},clear:function(){
var fa=this.getFeatures();
this.removeFeature(fa);
},moveTo:function(_b){
if(_b.zoomChanged){
if(this._features==null){
return;
}
_3.forEach(this._features,function(f){
this.renderFeature(f);
},this);
}
},redraw:function(){
if(_4.isIE){
setTimeout(_2.hitch(this,function(){
this.olLayer.redraw();
},0));
}else{
this.olLayer.redraw();
}
},added:function(){
}});
});

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
dojox-rails-0.14.0 vendor/assets/javascripts/dojox/geo/openlayers/Layer.js
dojox-rails-0.13.0 vendor/assets/javascripts/dojox/geo/openlayers/Layer.js
dojox-rails-0.12.0 vendor/assets/javascripts/dojox/geo/openlayers/Layer.js
dojox-rails-0.11.0 vendor/assets/javascripts/geo/openlayers/Layer.js