From 21e0129c693562b7acf40471ec7a03976c0e90cb Mon Sep 17 00:00:00 2001 From: rodionsh Date: Thu, 12 Mar 2015 12:12:50 +0200 Subject: [PATCH] Fix for TouchEvent problem If a control or marker is touched simultaneously with the map surface tha application crashes. --- OsmSharp.Android.UI/MapView.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/OsmSharp.Android.UI/MapView.cs b/OsmSharp.Android.UI/MapView.cs index 7f0a1bbc..b118960d 100644 --- a/OsmSharp.Android.UI/MapView.cs +++ b/OsmSharp.Android.UI/MapView.cs @@ -470,11 +470,12 @@ internal void NotifyMapChangeToControl(double pixelsWidth, double pixelsHeight, if (mapControl != null && mapControl.Handle != IntPtr.Zero) { - this.RemoveView(mapControl.BaseView); - if (mapControl.SetLayout(pixelsWidth, pixelsHeight, view, projection)) - { - this.AddView(mapControl.BaseView, mapControl.BaseView.LayoutParameters); - } + //this.RemoveView(mapControl.BaseView); + mapControl.SetLayout(pixelsWidth, pixelsHeight, view, projection); + //if (mapControl.SetLayout(pixelsWidth, pixelsHeight, view, projection)) + //{ + // this.AddView(mapControl.BaseView, mapControl.BaseView.LayoutParameters); + //} } } @@ -878,4 +879,4 @@ public void Close() _mapView.Close(); } } -} \ No newline at end of file +}