Having ShowMyLocation on on iOS (preview) and tapping on the current location marker crashes the app. I think this is not new.
On a different note, setting ShowMyLocationButton to true does nothing.
Hi
I just want to warn that even in 1.7, ShowMyLocation on iOS (preview and release) and tapping on the current location marker crashes the app. Do you have any news on when it will be fixed?
Thank you
Ok, here is the fix:
In MapViewDelegate.m :
Replace :
-(void)mapView:(MKMapView *)mapView didSelectAnnotationView:(MKAnnotationView *)view
{
if(markerSelectBlock){
FusePinAnnotation* a = [view annotation];
markerSelectBlock(a.markerID, a.title);
}
}
By :
-(void)mapView:(MKMapView *)mapView didSelectAnnotationView:(MKAnnotationView *)view
{
id annotation = view.annotation;
if (![annotation isKindOfClass:[MKUserLocation class]]) {
if(markerSelectBlock){
FusePinAnnotation* a = [view annotation];
markerSelectBlock(a.markerID, a.title);
}
}
}
And in :
-(MKAnnotationView *)mapView:(MKMapView *)theMapView viewForAnnotation:(id <MKAnnotation>)annotation
Add the following lines in the beginning of the method:
if ([annotation isKindOfClass:[MKUserLocation class]])
return nil; //return nil to use default blue dot view
And that’s all!
Wonderful job, Thomas! Thank you.