var toggleFacFilter = ""; var TPCFeatureInfoCtrl=function (config,funProcFeautres)//(popupFrm,commands){ //ctlMouseOver,ctlClick,ctlDblClick){ { this.checkVal = toggleFacFilter; this.setProcFeautres=function(funcProc) { funProcFeautres=funcProc; } var ctl= new OpenLayers.Control.WMSGetFeatureInfo({ // url: 'http://www.ximple.com.tw:80/geoserver/xtpc/wms', maxFeatures:OpenLayers.WMSFEATURECOUNT, title: 'Identify features by clicking', projection:config.projection, layers: [], drillDown:false, eventListeners: { beforegetfeatureinfo: function(evt) { /* this.vendorParams['cql_filter']=this.layers[0].params.CQL_FILTER; if(config.filterDgn==true) { var qTemp=config.map.getLonLatFromPixel(evt.xy); qTemp = qTemp.transform(config.map.projection, tw97); var dgnid=dgnParser.get1000(qTemp.lon,qTemp.lat); //config.map.projection 3857 if(typeof(this.vendorParams['cql_filter'])=='undefined') { this.vendorParams['cql_filter']='DGNID='+dgnid; } else { this.vendorParams['cql_filter']=this.vendorParams['cql_filter']+ 'AND DGNID='+dgnid; } if (this.checkVal.length > 0) { this.vendorParams['cql_filter'] = this.vendorParams['cql_filter'] + ' AND ' + this.checkVal; } }*/ if(typeof(this.vendorParams['cql_filter'])=='undefined') { delete this.vendorParams.cql_filter; } }, getfeatureinfo: function(event) { //console.log(event); //var items = []; /* var result={}; for(var idx=0;idx'+'修改', null, true ); feature.layer.map.addPopup(handlePopup); */ } function onFeatureUnselect(feature) { //map.removePopup(feature.popup); //feature.popup.destroy(); //feature.popup = null; } DrawControl.prototype.Events= { onFeatureSelect:onFeatureSelect, onFeatureUnselect:onFeatureUnselect //featureQuery:facQueryHandle } }; var CtlWriteLog=function(dataList,notifyEvent) { var notiftChanges=function() { if(notifyEvent!=null) notifyEvent.action(dataList); } this.action=function(data,wkttext) { dataList.push(wkttext); notiftChanges(); }; this.cancel=function() { dataList=[]; notiftChanges(); }; };