Google Map in Xamarin Forms

Hello Friends,

How do i open google map in Xamarin forms? I am using below code :smile:

  var address = assembly.Address;

                switch (Device.OS)
                {
                    case TargetPlatform.iOS:
                        Device.OpenUri(
                          new Uri(string.Format("http://maps.apple.com/?q={0}", WebUtility.UrlEncode(address))));
                        break;
                    case TargetPlatform.Android:
                        Device.OpenUri(
                          new Uri(string.Format("geo:0,0?q={0}", WebUtility.UrlEncode(address))));
                        break;
                    case TargetPlatform.Windows:
                    case TargetPlatform.WinPhone:
                        Device.OpenUri(
                          new Uri(string.Format("bingmaps:?where={0}", Uri.EscapeDataString(address))));
                        break;
                }

But it is not working for me in Android. My addess is "XXX, XXX Dr, XXX, XXXX" etc..

Answers

Sign In or Register to comment.