Bug 46113 - MKMapView's API delegate binding mess (naming inconsistencies)
Summary: MKMapView's API delegate binding mess (naming inconsistencies)
Status: CONFIRMED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll (show other bugs)
Version: XI 10.2 (iOS 10.1)
Hardware: Macintosh Mac OS
: Low enhancement
Target Milestone: Future Cycle (TBD)
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-10-28 08:31 UTC by Boris Spinner
Modified: 2016-10-30 17:58 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 46113 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description Boris Spinner 2016-10-28 08:31:27 UTC
I've stumbled over some API inconsistencies or weirdness.

Take a look at e.g. https://developer.xamarin.com/api/property/MonoTouch.MapKit.MKMapView.GetViewForAnnotation/.
The property currently isn't useful, since you can't set a delegate (opposing to the doc's remarks).
All you can do is set a *single* annotationView instance.
I guess this is due to some auto generator stuff?

Same here: https://developer.xamarin.com/api/property/MonoTouch.MapKit.MKMapView.GetViewForOverlay/

Here it was done as expected/correctly: https://developer.xamarin.com/api/property/MonoTouch.MapKit.MKMapView.OverlayRenderer/



# Relevant API docs
## Apple
https://developer.apple.com/reference/mapkit/mkmapviewdelegate
https://developer.apple.com/reference/mapkit/mkmapview

## Xamarin
https://developer.xamarin.com/api/type/MonoTouch.MapKit.MKMapView/
https://developer.xamarin.com/api/property/MonoTouch.MapKit.MKMapView.GetViewForAnnotation/
Comment 1 Vincent Dondain [MSFT] 2016-10-30 17:58:07 UTC
Hi Boris,

So MKMapViewAnnotation, MKRendererForOverlayDelegate and MKMapViewOverlay are all delegates.

If you do:

MKMapViewAnnotation a;
MKRendererForOverlayDelegate b;
MKMapViewOverlay c;

and go to declaration you'll see.

So the property you're referring to (https://developer.xamarin.com/api/property/MonoTouch.MapKit.MKMapView.GetViewForAnnotation/) is actually taking a delegate not "a single annotationView instance".

Now I do concede that there are some *naming inconstancies* but everything is working as expected.

The delegates should all have "Delegate" in their name, so I'll leave the bug open set as low enhancement (since it's a breaking change) so we can fix the naming issues.