//>>built define("dojox/geo/openlayers/TouchInteractionSupport",["dojo/_base/declare","dojo/_base/connect","dojo/_base/html","dojo/_base/lang","dojo/_base/event","dojo/_base/window"],function(_1,_2,_3,_4,_5,_6){ return _1("dojox.geo.openlayers.TouchInteractionSupport",null,{_map:null,_centerTouchLocation:null,_touchMoveListener:null,_touchEndListener:null,_initialFingerSpacing:null,_initialScale:null,_tapCount:null,_tapThreshold:null,_lastTap:null,constructor:function(_7){ this._map=_7; this._centerTouchLocation=new OpenLayers.LonLat(0,0); var _8=this._map.div; _2.connect(_8,"touchstart",this,this._touchStartHandler); _2.connect(_8,"touchmove",this,this._touchMoveHandler); _2.connect(_8,"touchend",this,this._touchEndHandler); this._tapCount=0; this._lastTap={x:0,y:0}; this._tapThreshold=100; },_getTouchBarycenter:function(_9){ var _a=_9.touches; var _b=_a[0]; var _c=null; if(_a.length>1){ _c=_a[1]; }else{ _c=_a[0]; } var _d=_3.marginBox(this._map.div); var _e=(_b.pageX+_c.pageX)/2-_d.l; var _f=(_b.pageY+_c.pageY)/2-_d.t; return {x:_e,y:_f}; },_getFingerSpacing:function(_10){ var _11=_10.touches; var _12=-1; if(_11.length>=2){ var dx=(_11[1].pageX-_11[0].pageX); var dy=(_11[1].pageY-_11[0].pageY); _12=Math.sqrt(dx*dx+dy*dy); } return _12; },_isDoubleTap:function(_13){ var _14=false; var _15=_13.touches; if((this._tapCount>0)&&_15.length==1){ var dx=(_15[0].pageX-this._lastTap.x); var dy=(_15[0].pageY-this._lastTap.y); var _16=dx*dx+dy*dy; if(_16=2){ var _29=this._getFingerSpacing(_22); _27=_29/this._initialFingerSpacing; this._map.zoomToScale(this._initialScale/_27); } var _2a=this._map.getCenter(); this._map.setCenter(new OpenLayers.LonLat(_2a.lon-_25,_2a.lat-_26)); }}); });