diff --git a/XFGoogleMapSample/Droid/XFGoogleMapSample.Droid.csproj b/XFGoogleMapSample/Droid/XFGoogleMapSample.Droid.csproj index eb71ccc0..36995bba 100644 --- a/XFGoogleMapSample/Droid/XFGoogleMapSample.Droid.csproj +++ b/XFGoogleMapSample/Droid/XFGoogleMapSample.Droid.csproj @@ -91,10 +91,10 @@ ..\packages\Xamarin.GooglePlayServices.Maps.29.0.0.1\lib\MonoAndroid41\Xamarin.GooglePlayServices.Maps.dll - ..\packages\Xamarin.Forms.GoogleMaps.1.4.1\lib\MonoAndroid10\Xamarin.Forms.GoogleMaps.Android.dll + ..\packages\Xamarin.Forms.GoogleMaps.1.5.0\lib\MonoAndroid10\Xamarin.Forms.GoogleMaps.Android.dll - ..\packages\Xamarin.Forms.GoogleMaps.1.4.1\lib\MonoAndroid10\Xamarin.Forms.GoogleMaps.dll + ..\packages\Xamarin.Forms.GoogleMaps.1.5.0\lib\MonoAndroid10\Xamarin.Forms.GoogleMaps.dll diff --git a/XFGoogleMapSample/Droid/packages.config b/XFGoogleMapSample/Droid/packages.config index 37cadb77..ef3d1ac2 100644 --- a/XFGoogleMapSample/Droid/packages.config +++ b/XFGoogleMapSample/Droid/packages.config @@ -9,7 +9,7 @@ - + diff --git a/XFGoogleMapSample/XFGoogleMapSample/BasicMapPage.xaml.cs b/XFGoogleMapSample/XFGoogleMapSample/BasicMapPage.xaml.cs index f6a2b36d..9114484b 100644 --- a/XFGoogleMapSample/XFGoogleMapSample/BasicMapPage.xaml.cs +++ b/XFGoogleMapSample/XFGoogleMapSample/BasicMapPage.xaml.cs @@ -49,6 +49,22 @@ public BasicMapPage() }; switchIsShowingUser.IsToggled = map.IsShowingUser; + // Map Clicked + map.MapClicked += (sender, e) => + { + var lat = e.Point.Latitude.ToString("0.000"); + var lng = e.Point.Longitude.ToString("0.000"); + this.DisplayAlert("MapClicked", $"{lat}/{lng}", "CLOSE"); + }; + + // Map Long clicked + map.MapLongClicked += (sender, e) => + { + var lat = e.Point.Latitude.ToString("0.000"); + var lng = e.Point.Longitude.ToString("0.000"); + this.DisplayAlert("MapLongClicked", $"{lat}/{lng}", "CLOSE"); + }; + // Geocode buttonGeocode.Clicked += async (sender, e) => { diff --git a/XFGoogleMapSample/XFGoogleMapSample/CustomPinsPage.xaml b/XFGoogleMapSample/XFGoogleMapSample/CustomPinsPage.xaml index 44a0009f..56bf6909 100644 --- a/XFGoogleMapSample/XFGoogleMapSample/CustomPinsPage.xaml +++ b/XFGoogleMapSample/XFGoogleMapSample/CustomPinsPage.xaml @@ -17,65 +17,84 @@ + - + + Grid.Row="0" + Grid.Column="0"/>