Customise CallOut that shows user location using placemark as subtitle

Discussion in 'iOS Programming' started by jacksongan, Nov 26, 2010.

  1. jacksongan macrumors member

    Joined:
    Aug 31, 2009
    #1
    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.
     
  2. jacksongan thread starter macrumors member

    Joined:
    Aug 31, 2009
    #2
    - (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.
     
  3. ianray macrumors 6502

    Joined:
    Jun 22, 2010
    Location:
    @
    #3
    Where is userLocation defined?
    What type is it?
    Why do you assign userLocation.location.coordinate to theCoordinate.latitude?
    Why is theCoordinate.longitude fixed?
     
  4. jacksongan thread starter macrumors member

    Joined:
    Aug 31, 2009
    #4
    thanks mate, i have sorted out everything myself, :)
     

Share This Page