Get X and Y Coordinate From Annotation iOS -
this should simple enough, i'm getting use mapkit framework. need here coordinates of selected annotation (to save them). im not concerned core data side of things. retrieve coordinates selected annotation. unfortunately, there doesn't seem resources on stack overflow topic.
i have code set annotation title of selected annotation, of leg work should done here. there has similar can find coordinate of same annotation.
[datasource sharedinstance].pointfrommapview = [self.mapview.selectedannotations objectatindex:([self.mapview.selectedannotations count]) -1]; [datasource sharedinstance].annotationtitlefrommapview = [datasource sharedinstance].pointfrommapview.title;
the code above retrieve annotation title. there has way can use code retrieve coordinate well. ideas?
use [datasource sharedinstance].pointfrommapview.coordinate
coordinate annotation.
Comments
Post a Comment