[OpenMap Users] how to select the graphics record from the shape layer out of many records

From: Raghu <raghav_kune_at_yahoo.com>
Date: Sun, 20 Feb 2011 00:04:33 -0800 (PST)

Hello ,
 Can you let us know how to add to select the graphic from the shape file which
is added to map bean. We have added a shape layer to the bean , this shape has
around 500 records. Actually we would like to add mouseevent to the layer so as
to select the graphics from the shape file and able to read the corresponding
entry from the shape file basically to get the latitude and longitude of the
selected graphic.

We have added the shape file using EsriPlugin . Snippet code is given below :

                String shpFile = "c:/test.shp";
                String dbfFile =
shpFile.substring(0,shpFile.indexOf(".shp"))+".dbf";
                String shxFile =
shpFile.substring(0,shpFile.indexOf(".shp"))+".shx";;
                DrawingAttributes da = new DrawingAttributes();
                da.setSelectPaint(new Color(200, 100, 100, 200));
              
                File dbf = new File(dbfFile);
                File shp = new File(shpFile);
                File shx = new File(shxFile);
                EsriPlugIn esriPlugin = new
EsriPlugIn("name",dbf.toURI().toURL(),shp.toURI().toURL(),shx.toURI().toURL());
                PlugInLayer pil = new PlugInLayer();
                
                pil.setPlugIn(esriPlugin);
                EsriGraphicList esriGraphicList =
esriPlugin.getEsriGraphicList();
               layerHandler.addLayer(pil);
               mapHandler.add(layerHandler);


help is greatly appreciated.

 Raghu


      

--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Sun Feb 20 2011 - 03:05:02 EST

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:10 EDT