2014-09-17 16 views
0

실제의 경우 추가 CQL 매개 변수가있는 WMS 요청의 정의가 맵 초기화 시작 부분에 정의되어 있습니다.컨트롤의 정의 후에 WMSGetFeatureInfo의 buildWMSOptions를 어떻게 변경할 수 있습니까?

초기 WMSGetFeatureInfo (wmsGetFeatureInfoOptions) 선택을 변경할 때 CQL 매개 변수가 변경되지 않은 것 같습니다. 하나 이는 mergeNewParams와 GWT-OPenLayers에

최종 WMSParams의 wmsParams = 새로운 WMSParams을 수행 할 수있는 WMS()를 표시하기위한 CQL 파라미터를 변경 한편

; wmsParams.setCQLFilter (this.makeCqlString()); wmsParams.setParameter (((Double) Math.random()). toString(), ((Double) Math.random()). toString()); this.infoWMS.mergeNewParams (wmsParams);

buildWMSOptions (openLayers)는 wmsGetFeatureInfoOptions과 비슷한 기능을 수행해야합니다.

질문에 대한 응답은 원래 wmsGetFeatureInfo을 다시하고 원래 단에 이것을 CQL 매개 변수가되었습니다 변화를 다시

답변

0

입니다

public void reDrawInfoLayer() 
    { 
     final WMSParams wmsParams = new WMSParams(); 
     wmsParams.setCQLFilter(this.makeCqlString()); 
     wmsParams.setParameter(((Double) Math.random()).toString(), ((Double) Math.random()).toString()); 
     this.infoWMS.mergeNewParams(wmsParams); 
     this.infoWMS.redraw(); 

     if (mapPanel.getWmsGetFeatureInfo() != null) 
     { 
      mapPanel.getWmsGetFeatureInfo().disable(); 
      mapPanel.getWmsGetFeatureInfo().deactivate(); 
      mapPanel.getMap().removeControl(mapPanel.getWmsGetFeatureInfo()); 
     } 

     mapPanel.getWmsGetFeatureInfoOptions().setInfoFormat(GetFeatureInfoFormat.GML.toString()); 
     mapPanel.getWmsGetFeatureInfoOptions().setMaxFeaturess(1); 

     // determine the currently visible WMS layers 
     final List<WMS> lLayers = this.getVisibleWmsLayers(); 

     mapPanel.getWmsGetFeatureInfoOptions().setLayers(lLayers.toArray(new WMS[lLayers.size()])); 

     // create the WmsGetFeatureInfo 
     mapPanel.setWmsGetFeatureInfo(new WMSGetFeatureInfo(mapPanel.getWmsGetFeatureInfoOptions())); 
     mapPanel.getMap().addControl(mapPanel.getWmsGetFeatureInfo()); 
     mapPanel.getWmsGetFeatureInfo().activate(); 



     // Add get FeatureListener 
     mapPanel.getWmsGetFeatureInfo().addGetFeatureListener(new GetFeatureInfoListener() 
     { 
관련 문제