POST
|
Thanks for responding. I couldn't make much progress. Here is another way asking the same question: Given the CLLocation *location, how can I draw an annotation on the map? Any code samples would be highly appreciated. Thanks.
... View more
10-01-2015
06:13 PM
|
0
|
1
|
547
|
POST
|
Now that I have loaded a map in my app, I need to show a marker annotation for a location. Here is the code I'm using but nothing is showing on the map: CLLocation *location = [[CLLocation alloc] initWithLatitude:douLat longitude:douLon]; AGSPoint *markerPoint = [AGSPoint pointWithLocation:location]; AGSGraphicsLayer* myGraphicsLayer = [AGSGraphicsLayer graphicsLayer]; [self.ibMapView addMapLayer:myGraphicsLayer withName:@"Graphic Layer"]; AGSPictureMarkerSymbol *markerSymbol = [AGSPictureMarkerSymbol pictureMarkerSymbolWithImageNamed:@"existing_project_icon.png"]; AGSGraphic* myGraphic = [AGSGraphic graphicWithGeometry:markerPoint symbol:markerSymbol attributes:nil]; // Add the graphic to the Graphics layer [myGraphicsLayer addGraphic:myGraphic]; [self.ibMapView.callout showCalloutAtPoint:markerPoint forFeature:myGraphic layer:myGraphicsLayer animated:YES]; Please help.
... View more
09-27-2015
10:50 AM
|
0
|
4
|
3148
|
POST
|
Hi, I'm trying to use esri map for the first time in my iOS app POC. I have instantiated the map object but I seem to have a problem zooming to user current location using AGSEnvelope object. Here is code: CLLocation *location = self.myLocationManager.location; float extentDelta = 0.025; AGSEnvelope *envelope = [AGSEnvelope envelopeWithXmin:(location.coordinate.longitude - extentDelta) ymin:(location.coordinate.latitude - extentDelta) xmax:(location.coordinate.longitude + extentDelta) ymax:(location.coordinate.latitude + extentDelta) spatialReference:[AGSSpatialReference wgs84SpatialReference]]; [self.ibMapView zoomToEnvelope:envelope animated:YES]; It is zooming into North Sea near UK. I am sure the CLLocation is coming with my current location. Please help.
... View more
09-20-2015
05:28 PM
|
0
|
1
|
2852
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|