[mapserver-users] java mapscript - couldn't manage queryByPoint

orkun temiz at deprem.gov.tr
Thu Jul 10 10:38:06 PDT 2008


hello

I couldn't manage queryByPoint function in java mapscript 

here is the code I have tried : 


double tolerance = map1.getWidth()/100; //we use this tolerance
       
if (jeolayer.queryByPoint(map1, pt1, mapscript.MS_SINGLE ,tolerance )==
1) 
   {  
      
       resultCacheObj qresult = jeolayer.getResults() ;
       
       if (qresult.getNumresults() > 0) {
           int shapeInd = qresult.getResult(0).getShapeindex();
           jeolayer.open();
           shapeObj shape=jeolayer.getFeature(shapeInd, -1);
           //iterate fields and getting values
           for(int i=0; i< jeolayer.getNumitems() ; i++) {
               //jeolayer.getItem(i);
               String item=jeolayer.getItem(i);
               
               String shapeval=shape.getValue(i);
               String tamam="tamam" ;
           }

       }
       }


where am I doing wrong ?


regards
-- 
Ahmet Temiz
Jeo. Müh.
Afet İşleri Gen. Md.lüğü
Deprem Ar. D.

Ahmet Temiz
Geo. Eng.
General Dir. of 
Disaster Affairs



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




More information about the MapServer-users mailing list