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.
Thanks for reporting! Here’s a ticket for it.
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!
Here is my Pull Request:
https://github.com/fusetools/fuselibs-public/pull/1122
Wonderful job, Thomas! Thank you.