Bug 29817 - MapRenderer causes InvalidOperationException (overriding delegate)
Summary: MapRenderer causes InvalidOperationException (overriding delegate)
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS ()
Version: 1.4.2
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Rui Marinho
URL:
Depends on:
Blocks:
 
Reported: 2015-05-06 17:56 UTC by Adam Kemp
Modified: 2015-07-06 08:14 UTC (History)
3 users (show)

Tags: ac ios maps
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 on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Adam Kemp 2015-05-06 17:56:44 UTC
The iOS MapRenderer in Xamarin.Forms.Maps now causes an exception due to overriding the delegate. The line is here (in OnelementChanged):

					MKMapView mKMapView = (MKMapView)base.Control;
					mKMapView.Delegate = new MapDelegate(map2);
					mKMapView.RegionChanged += new EventHandler<MKMapViewChangeEventArgs>(this.MkMapViewOnRegionChanged);

The last line overrides the first line. Is this why pin selection was broken?
Comment 1 Brendan Zagaeski (Xamarin Team, assistant) 2015-05-06 21:16:53 UTC
For reference, this looks like a duplicate of bug 29191. See in particular bug 29191, comment 5.
Comment 2 Rui Marinho 2015-07-06 08:14:03 UTC
Should be fixed in 1.4.3