AnsweredAssumed Answered

How to select graphic on click

Question asked by pehrans on Jan 10, 2016
Latest reply on Jan 12, 2016 by ANohe-esristaff

I'm using the arcGIS Android API with Android Studio, and I would like to know how to select a graphic symbol when a user taps on it. I have a graphics layer and I've added a couple picture marker symbols to it. I simply want to show a symbol as being selected when a user taps on it.

Creating the graphics:

graphicAirport_IAD = new Graphic(projIAD, pmsAirport); 
graphicAirport_DCA = new Graphic(projDCA, pmsAirport);
graphicAirport_BWI = new Graphic(projBWI, pmsAirport);

Adding the graphics to map view:

mMapView.addLayer(gAirport); 
gAirport.addGraphic(graphicAirport_IAD);
gAirport.addGraphic(graphicAirport_DCA);
gAirport.addGraphic(graphicAirport_BWI);

The graphics all show up fine. Again, I would just like to be able to select them when they're tapped on (respectively) by a user.

 

Thanks!

Outcomes