Exemplo n.º 1
0
        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());
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        void SetPosition(AndroidJavaObject ajo)
        {
            switch (_setPositionMethodAndroid)
            {
            case SetPositionMethodAndroid.LatLngWidthOnly:
                ajo.CallAJO("position", _latLng.ToAJO(), _width);
                break;

            case SetPositionMethodAndroid.LatLngWidthHeight:
                ajo.CallAJO("position", _latLng.ToAJO(), _width, _height);
                break;

            case SetPositionMethodAndroid.LatLngBounds:
                ajo.CallAJO("positionFromBounds", _latLngBounds.ToAJO());
                break;

            case SetPositionMethodAndroid.NotSet:
                break;

            default:
                Debug.LogError("GroundOverlayOptions must have position set");
                break;
            }
        }
Exemplo n.º 4
0
        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 }
            }));
        }