public static void Init(Activity activity, Bundle bundle, PlatformConfig config = null, int MapStyleResourceId = 0) { if (IsInitialized) { return; } Context = activity; MapRenderer.Bundle = bundle; MapRenderer.Config = config ?? new PlatformConfig(); ResourceId = MapStyleResourceId; #pragma warning disable 618 if (GooglePlayServicesUtil.IsGooglePlayServicesAvailable(Context) == ConnectionResult.Success) #pragma warning restore 618 { try { MapsInitializer.Initialize(Context); IsInitialized = true; } catch (Exception e) { Console.WriteLine("Google Play Services Not Found"); Console.WriteLine("Exception: {0}", e); } } GeocoderBackend.Register(Context); }
public static void Init(string apiKey, PlatformConfig config = null) { MapServices.ProvideApiKey(apiKey); GeocoderBackend.Register(); MapRenderer.Config = config ?? new PlatformConfig(); IsInitialized = true; }
public static void Init(Activity activity, Bundle bundle) { if (IsInitialized) { return; } IsInitialized = true; Context = activity; MapRenderer.Bundle = bundle; #pragma warning disable 618 if (GooglePlayServicesUtil.IsGooglePlayServicesAvailable(Context) == ConnectionResult.Success) #pragma warning restore 618 { try { MapsInitializer.Initialize(Context); } catch (Exception e) { Console.WriteLine("Google Play Services Not Found"); Console.WriteLine("Exception: {0}", e); } } GeocoderBackend.Register(Context); }
public static void Init() { if (s_isInitialized) { return; } GeocoderBackend.Register(); s_isInitialized = true; }
static async void UserConsentAction(TaskCompletionSource <bool> tcs) { var result = await MapService.RequestUserConsent(); if (result) { GeocoderBackend.Register(); IsInitialized = true; } else { Log.Warn("Failed to get user consent which is required to use map service."); } tcs.SetResult(result); }
public static void Init(string apiKey) { MapServices.ProvideAPIKey(apiKey); GeocoderBackend.Register(); IsInitialized = true; }