public Dictionary <string, object> ToDictionary() { var result = new Dictionary <string, object>(); result[AnchorMethodName + "U"] = _anchorU; result[AnchorMethodName + "V"] = _anchorV; result[BearingMethodName] = _bearing; result[ImageMethodName] = _imageDescriptor.AssetName.ToFullStreamingAssetsPath(); result[TransparencyMethodName] = _transparency; result[ZIndexMethodName] = _zIndex; result[ClickableMethodName] = _clickable; if (_latLng == null && _latLngBounds == null) { Debug.LogError("Position for GroundOverlay was not provided. Errors ahead."); } if (_latLngBounds != null) { result["bounds"] = _latLngBounds.ToDictionary(); } if (_latLng != null) { result["position"] = _latLng.ToDictionary(); result["zoomLevel"] = _iosZoom; } return(result); }
public void SetPositionFromBounds(LatLngBounds bounds) { if (GoogleMapUtils.IsPlatformNotSupported) { return; } CheckIfRemoved(); #if UNITY_IOS && !DISABLE_IOS_GOOGLE_MAPS _googleMapsViewOverlaySetBounds(_overlayPtr, Json.Serialize(bounds.ToDictionary())); #endif SetValueIfAndroid("setPositionFromBounds", bounds.ToAJO()); }
public GoogleMapsOptions LatLngBoundsForCameraTarget(LatLngBounds llbounds) { if (GoogleMapUtils.IsPlatformNotSupported) { return(this); } if (GoogleMapUtils.IsAndroid) { _ajo.CallAJO(LatLngBoundForCameraTargetMethodName, llbounds.ToAJO()); } else { _dic[LatLngBoundForCameraTargetMethodName] = llbounds.ToDictionary(); } return(this); }
public static CameraUpdate NewLatLngBounds(LatLngBounds bounds, int width, int height, int padding) { if (GoogleMapUtils.IsPlatformNotSupported) { return(DummyCameraUpdate); } if (GoogleMapUtils.IsAndroid) { return(new CameraUpdate(CreateCameraUpdateAJO(NewLatLngBoundsMethodName, bounds.ToAJO(), width, height, padding))); } return(new CameraUpdate(new Dictionary <string, object> { { CameraUpdateTypeKey, NewLatLngBoundsMethodName + "WithInsets" }, { "bounds", bounds.ToDictionary() }, { "padding", padding } })); }
public static void ShowPlaceAutocomplete( [NotNull] Action <Place> onPlacePicked, [NotNull] Action <string> onFailure, [GoogleMapsAndroidOnly] Mode mode = Mode.Fullscreen, AutocompleteFilter filter = AutocompleteFilter.None, string countryCode = null, LatLngBounds boundsBias = null) { if (onPlacePicked == null) { throw new ArgumentNullException("onPlacePicked"); } if (onFailure == null) { throw new ArgumentNullException("onFailure"); } if (GoogleMapUtils.IsPlatformNotSupported) { return; } _onPlacePicked = onPlacePicked; _onFailure = onFailure; GooglePlacesSceneHelper.Init(); if (GoogleMapUtils.IsAndroid) { PlacePickerActivityUtils.LaunchPlaceAutocomplete(mode, filter, countryCode, boundsBias); } #if UNITY_IOS && !DISABLE_IOS_GOOGLE_MAPS string bounds = null; if (boundsBias != null) { bounds = Json.Serialize(boundsBias.ToDictionary()); } _googleMapsShowPlaceAutocomplete((int)mode, (int)filter, countryCode, bounds); #endif }