gibbz-one / air-maps-ane

Automatically exported from code.google.com/p/air-maps-ane
0 stars 0 forks source link

custom images instead of pin #10

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
hi,

do you have any idea for using custom image instead of pin.

i tried something like
MapWrapper.m
...
-(MKAnnotationView *)mapView:(MKMapView *)mapViewLocal 
viewForAnnotation:(id<MKAnnotation>)annotation
{
    MKPinAnnotationView* pinView=(MKPinAnnotationView*)[mapViewLocal dequeueReusableAnnotationViewWithIdentifier:@"CustomPinAnnotation"];
    if(!pinView)
    {
        NSLog(@"Didn't Got from deque");
        pinView=[[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:@"CustomPinAnnotation"] autorelease];
    }
    else
    {
        NSLog(@"Readily Got from deque");
        pinView.annotation=annotation;
    }

    pinView.enabled = YES;
    pinView.image=[UIImage imageNamed:@"arrest.png"];//here we use a nice image instead of the default pins
    pinView.canShowCallout = YES;

    return pinView;
}

it crashed and i don't know how to debug
i have put "arrest.png" to root. i checked it in the ipa file it is there. 

any idea...

Original issue reported on code.google.com by zafe...@gmail.com on 20 Nov 2012 at 2:37

GoogleCodeExporter commented 9 years ago
problem solved 

i put arrest.png file to a folder in flash builder 

have a nice day

Original comment by zafe...@gmail.com on 21 Nov 2012 at 10:19

GoogleCodeExporter commented 9 years ago
hey zefe. you did it? it works?
please let me know

Original comment by ricardoc...@gmail.com on 11 Apr 2013 at 1:37