• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
addOverlays but mapView:viewForOverlay: never called
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: KVO and Core data
  • Next by Date: Re: KVO and Core data
  • Previous by thread: Re: KVO and Core data
  • Next by thread: Core Data bindings: add entity to relationship
  • Index(es):
    • Date
    • Thread