Solved! Go to Solution.
dojo.extend(esri.geometry.Extent,{ intersection: function(/*esri.geometry.Extent*/ extent) { // summary: // Calculate the intersection extent of two extents // returns: // The intersection extent // esri.geometry.Extent || null var overlap = null; if(this.intersects(extent)){ // create a new intersection geometry overlap = new esri.geometry.Extent( this.xmin > extent.xmin ? this.xmin : extent.xmin, this.ymin > extent.ymin ? this.ymin : extent.ymin, this.xmax < extent.xmax ? this.xmax : extent.xmax, this.ymax < extent.ymax ? this.ymax : extent.ymax, this.spatialReference ); } return overlap; } });
dojo.extend(esri.geometry.Extent,{ intersection: function(/*esri.geometry.Extent*/ extent) { // summary: // Calculate the intersection extent of two extents // returns: // The intersection extent // esri.geometry.Extent || null var overlap = null; if(this.intersects(extent)){ // create a new intersection geometry overlap = new esri.geometry.Extent( this.xmin > extent.xmin ? this.xmin : extent.xmin, this.ymin > extent.ymin ? this.ymin : extent.ymin, this.xmax < extent.xmax ? this.xmax : extent.xmax, this.ymax < extent.ymax ? this.ymax : extent.ymax, this.spatialReference ); } return overlap; } });