summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoonghyun Cho <jh5.cho@samsung.com>2017-10-11 02:37:49 (GMT)
committerKangho Hur <kangho.hur@samsung.com>2017-10-23 04:34:42 (GMT)
commit1a7c36737dcbe6b2fc516cb72d9f3921b18c324a (patch)
tree77380a6a9086fc216dcc60f36a6ad62fe463cbde
parent4e3c8147851c2e438a5b3ac1f1c226bdf0a0681f (diff)
downloadxamarin-forms-1a7c36737dcbe6b2fc516cb72d9f3921b18c324a.zip
xamarin-forms-1a7c36737dcbe6b2fc516cb72d9f3921b18c324a.tar.gz
xamarin-forms-1a7c36737dcbe6b2fc516cb72d9f3921b18c324a.tar.bz2
[Maps] Add exception handling code for IsShowingUser
- Add the exception handling code for IsShowingUser property. - Revert setting IsShowingUser back to false when the Location service setting on the target device is set to OFF. Change-Id: Icb213f9f4c1b43772fcd320f0d91b217a17d8ab6
-rw-r--r--Xamarin.Forms.Maps.Tizen/MapRenderer.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Xamarin.Forms.Maps.Tizen/MapRenderer.cs b/Xamarin.Forms.Maps.Tizen/MapRenderer.cs
index 32e4f1a..23252c4 100644
--- a/Xamarin.Forms.Maps.Tizen/MapRenderer.cs
+++ b/Xamarin.Forms.Maps.Tizen/MapRenderer.cs
@@ -257,6 +257,13 @@ namespace Xamarin.Forms.Maps.Tizen
{
if (Element.IsShowingUser)
{
+ if (!LocatorHelper.IsEnabledType(LocationType.Hybrid))
+ {
+ Log.Error("Failed to start Locator. Please check if the Location setting on your device is On.");
+ Element.IsShowingUser = false;
+ return;
+ }
+
_locator.Value.LocationChanged += OnLocationChanged;
if (!_isLocatorStarted)
{