void HandleShow() { foreach (var mapView in _activeMaps) { if (mapView.CachedVisibilityHack) { mapView.IsVisible = true; } mapView.GoogleMapViewAJO.Call("onStart"); mapView.GoogleMapViewAJO.Call("onResume"); JniToolkitUtils.RunOnUiThread(() => mapView.ImmersiveModeAndroidHack()); } }
public GoogleMapsView([CanBeNull] GoogleMapsOptions options) { if (GoogleMapUtils.IsPlatformNotSupported) { return; } _options = options ?? new GoogleMapsOptions(); GoogleMapsSceneHelper.Init(); if (GoogleMapUtils.IsAndroid) { JniToolkitUtils.RunOnUiThread(() => { _ajo = new AndroidJavaObject(ClassName, JniToolkitUtils.Activity); }); } #if UNITY_IOS && !DISABLE_IOS_GOOGLE_MAPS _mapPtr = _createGoogleMapsView(); #endif }
public void ClearItems() { if (GoogleMapUtils.IsPlatformNotSupported) { return; } if (GoogleMapUtils.IsAndroid) { JniToolkitUtils.RunOnUiThread(() => { _clusterManagerAJO.Call("clearItems"); AndroidCluster(); }); } #if UNITY_IOS && !DISABLE_IOS_GOOGLE_MAPS _googleMapsViewClusterManagerClearItems(_clusterManagerPtr); #endif }
public void SetRect(Rect rect) { if (GoogleMapUtils.IsPlatformNotSupported) { return; } if (GoogleMapUtils.IsAndroid) { JniToolkitUtils.RunOnUiThread(() => _ajo.Call("setRect", (int)rect.x, (int)rect.y, (int)rect.width, (int)rect.height)); } #if UNITY_IOS && !DISABLE_IOS_GOOGLE_MAPS rect = HackForIphone6Plus(rect); if (_mapPtr.IsNonZero()) { _googleMapsViewSetRect(_mapPtr, (int)rect.x, (int)rect.y, (int)rect.width, (int)rect.height); } #endif }
public GoogleMapsView([CanBeNull] GoogleMapsOptions options) { if (GoogleMapUtils.IsPlatformNotSupported) { return; } _options = options ?? new GoogleMapsOptions(); if (GoogleMapUtils.IsAndroid) { JniToolkitUtils.RunOnUiThread(() => { _ajo = new AndroidJavaObject(ClassName, JniToolkitUtils.Activity); }); } #if UNITY_IOS && !DISABLE_IOS_GOOGLE_MAPS if (GoogleMapsViewSettings.IosApiKey == GoogleMapsViewSettings.IOS_KEY_PLACEHOLDER || string.IsNullOrEmpty(GoogleMapsViewSettings.IosApiKey)) { Debug.LogError("The provided API key is incorrect. " + FixApiKeyMessage); } _googleMapsViewInit(GoogleMapsViewSettings.IosApiKey.Trim()); _mapPtr = _createGoogleMapsView(); #endif }