Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jacksongan

macrumors member
Original poster
Aug 31, 2009
47
0
i hv problem substituting placemark data into my customised callout,


- (NSString *)subtitle
{
return placemark.country;
}


when i include this code in the callout.m, the callout did not appear when i touch the pin.
 
- (CLLocationCoordinate2D)coordinate;
{
CLLocationCoordinate2D theCoordinate;
theCoordinate.latitude = userLocation.location.coordinate;
theCoordinate.longitude = 130.333l;
return theCoordinate;
}

compiler mentioned that userLocation is undeclared, in my customCallout.m, i tried to #import MapViewController but it simply wont get rid of the error. My idea is to show the CallOut and reveal the placemark in human readable address.
 
Where is userLocation defined?
What type is it?
Why do you assign userLocation.location.coordinate to theCoordinate.latitude?
Why is theCoordinate.longitude fixed?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.