
OpenLayers.GreaseOl.Control.GreaseControlClick=OpenLayers.Class(OpenLayers.Control,{defaultHandlerOptions:{'single':true,'double':false,'pixelTolerance':0,'stopSingle':true,'stopDouble':true},defaultGreaseOptions:{'execFn':defaultClick,'ajaxFunction':null,'showLoading':true,'resetImages':false,'showLoadingToc':false,'command':'','cursorClass':null},greaseOptions:null,setGreaseOptions:function(greaseOptions){this.greaseOptions=OpenLayers.Util.extend({},this.defaultGreaseOptions);this.greaseOptions=OpenLayers.Util.extend(this.greaseOptions,greaseOptions);return true;},initialize:function(cssStyle,options){this.greaseOptions=OpenLayers.Util.extend({},this.defaultGreaseOptions);options=OpenLayers.Util.extend({cssStyle:cssStyle},options);this.handlerOptions=OpenLayers.Util.extend({},this.defaultHandlerOptions);OpenLayers.Control.prototype.initialize.apply(this,[options]);this.handler=new OpenLayers.Handler.Click(this,{'click':this.onClick,'dblclick':this.onDblclick},this.handlerOptions);},onClick:function(e){var lonlat=this.map.getLonLatFromViewPortPx(e.xy);x=lonlat.lon;y=lonlat.lat;this.greaseOptions.execFn([lonlat],this.map,this.greaseOptions.ajaxFunction,this.greaseOptions,OpenLayers.GreaseOl.Constants.GEOMETRY_TYPE_POINT);},onDblclick:function(e){var lonlat=this.map.getLonLatFromViewPortPx(e.xy);x=lonlat.lon;y=lonlat.lat;this.greaseOptions.execFn([lonlat],this.map,this.greaseOptions.ajaxFunction,this.greaseOptions,OpenLayers.GreaseOl.Constants.GEOMETRY_TYPE_POINT);},deactivate:function(){if(this.handler!=null)this.handler.deactivate();OpenLayers.Control.prototype.deactivate.apply(this);},activate:function(){if(this.handler!=null)this.handler.activate();OpenLayers.Control.prototype.activate.apply(this);},CLASS_NAME:"OpenLayers.GreaseOl.Control.GreaseControlClick"});