AnsweredAssumed Answered

How to add a circle with a radius in meters to a graphics layer?

Question asked by purpledunes on Jun 12, 2014
Latest reply on Jun 12, 2014 by purpledunes
I built a feature which searches documents within a certain range (in meters) around a coordinate. I would like to show this range to the user by drawing a circle. I think I go the individual pieces, through e.g. this post, but I can't fit them together.

graphicsLayer is an instance of ASGraphicsLayer, which is already displaying a bunch of items. latitude and longitude are in decimal degrees. The graphics layer is in web mercator.

AGSPoint* centerPoint =  [AGSPoint pointWithX:longitude                                y:latitude                 spatialReference:[AGSSpatialReference wgs84SpatialReference]];               AGSPoint *webMercatorPoint = (AGSPoint *)[[AGSGeometryEngine defaultGeometryEngine] projectGeometry:centerPoint toSpatialReference:[AGSSpatialReference webMercatorSpatialReference]];              AGSPolygon *polygon = [self circleWithCenter:webMercatorPoint radius:rangeInMeters];                          AGSGraphic *graphic = [AGSGraphic graphicWithGeometry:polygon symbol:nil attributes:nil];              [self.markerGraphicsLayer addGraphic:graphic];

I don't see a circle on the map when I do this.