Select to view content in your preferred language

Get Graphic of GraphicsLayer Like on Android

3288
1
07-26-2013 06:57 AM
MariusGächter
Emerging Contributor
Dear all

Is there a possibility to get a graphic near a point on a graphicslayer on IOS in a similar way as on Android?
Like so:
[ATTACH=CONFIG]26249[/ATTACH]
(java: int[] clickedGraphicIDs = this.graphicLayer.getGraphicIDs(x, y, 30, 1); )

Thanks very much

cheers!
0 Kudos
1 Reply
ChristopherBarger
Emerging Contributor
Hello,

If you are set up for touch events in an AGSMapView (AGSMapViewTouchDelegate), you can use the method

mapView:didClickAtPoint:mapPoint:graphics:

this will run any time you tap the AGSMapView. It will return graphics as well as the screen and map point that you tapped. You can then do something like this to get all the graphics registered from that tap:


NSDictionary *graphicsDictionary = graphics;//graphics being what is passed in by the method
NSArray *graphicsArray = [graphicsDictionary valueForKey:@"YourGraphicsLayerName"];



Hope this helps.
0 Kudos