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 } })); }