addOverlays but mapView:viewForOverlay: never called
addOverlays but mapView:viewForOverlay: never called
- Subject: addOverlays but mapView:viewForOverlay: never called
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Mon, 9 Aug 2010 18:20:11 +0700
I have an MKMapView which does addOverlays:
but it's delegate MKMapViewDelegate method mapView:viewForOverlay: is never called.
The overlays receive the message boundingMapRect:
- (MKMapRect)boundingMapRect
{
MKMapPoint lowerLeft = MKMapPointForCoordinate(minC);
MKMapPoint upperRight = MKMapPointForCoordinate(maxC);
MKMapRect re = MKMapRectMake ( lowerLeft.x, upperRight.y,
upperRight.x - lowerLeft.x, lowerLeft.y - upperRight.y
);
return re;
}
A line from +13.720498° / +100.557946° to +13.719897° / +100.559414° returns the MKMapRect {{209199167.2, 123887777.8}, {1094.4, 460.9}}
Looks creditable to me, but is it really?
Whenever the map size changes (e.g. by pinching) the message boundingMapRect is sent again.
So what am I missing?
Kind regards,
Gerriet.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden