Hello ,
I made a request WMS / GetFeatureInfo to have the features contained in the 
layer as a work in uDig" info button".But there are only few layers where it 
makes features like "A sample ArcGrid file" but for example "USA population" it 
gives me "no features were found" while there are several by this manipulation 
in uDig. What is the error in my code? Perhaps the parse coordinates from 
double to int? is there a method to know the table schema that contains the 
features in a layer?

Code:
           GetMapRequest getMapRequest = wms.createGetMapRequest();             
                           
       
           getMapRequest.setSRS("EPSG:4326");       
           getMapRequest.setDimensions("400", "400");       
           getMapRequest.setFormat("image/png");       
           
getMapRequest.setBBox("-114.01268,59.4596930,-113.26043,60.0835794");           
            
           getMapRequest.addLayer(wmsLayerSelected);  
      
           GetFeatureInfoRequest request = 
wms.createGetFeatureInfoRequest(getMapRequest);

        // We want request this layer              
           request.addQueryLayer(wmsLayerSelected);            
       
        // coordinates with click OnMouse in the map     
           
request.setQueryPoint((int)ev.getMapPosition().x,(int)ev.getMapPosition().y);   
                  
          
        // We ask the server          
           GetFeatureInfoResponse response=null;
        try {
            response = (GetFeatureInfoResponse) wms.issueRequest(request);
        } catch (ServiceException e) {           
            e.printStackTrace();
        } catch (IOException e) {           
            e.printStackTrace();
        }      
        
           BufferedReader in = new BufferedReader(new 
InputStreamReader(response.getInputStream()));      
           String line;
           while ((line = in.readLine()) != null) {
               System.out.println(line);

Thank you in advance :)
                                          
------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to