Select to view content in your preferred language

Adding overlays using ArcGIS API's - iOS

3298
4
06-05-2013 04:38 AM
SandeepG_S
Occasional Contributor
Hi All,

I am replacing MKMapView with AGSMapView. My requirement is to add different types of overlays on a map (Circle, Polygon). These can be drawn using MKMapView's classes like MKCircle, MKPolygon etc..

How to achieve the same using ArcGIS API's. Is there are any equivalent classes or any alternative to do this ?

Please help.

Thanks,
Sandeep
0 Kudos
4 Replies
DiveshGoyal
Esri Regular Contributor
Yes, you use "graphics" to add overlays on top of the map.
http://developers.arcgis.com/en/ios/guide/creating-a-graphics-layer.htm
0 Kudos
AkhilChoran_Balan
Deactivated User

How do I add an arc over the map? I want to add something like a quad curve over the map connecting two points but I am not sure which method should be overridden after subclassing AGSPolyline or AGSGeometry. In mapkit, I can override "createPath:" method in MKOverlayPathRenderer subclass for this. Is there something similar here?

0 Kudos
DiveshGoyal
Esri Regular Contributor

Unfortunately, we do not yet (v10.2.4) support true curves in our geometry objects; they are based on discrete vertices. We do plan to add support for curves in a future release. If you have a bezier curve already, you will need to "flatten" it , get its vertices, and add to a polyline/polygon geometry. On OSX, NSBezierPath has a handy function bezierPathByFlatteningPath . However, on iOS, UIBezierPath does not seem to have anything similar. Here's a stack overflow post that you may find helpful :  ios - Flattening a CGPath - Stack Overflow

0 Kudos
AkhilChoran_Balan
Deactivated User

Thanks for the reply. When can we expect the next release with this feature? Flattening is not an option for us as the business requirement is to have an arc drawn and polyline is not helping.

0 Kudos