Пример #1
0
        public GroundOverlayOptions PositionFromBounds([NotNull] LatLngBounds latLngBounds)
        {
            if (latLngBounds == null)
            {
                throw new ArgumentNullException("latLngBounds");
            }

            _setPositionMethodAndroid = SetPositionMethodAndroid.LatLngBounds;

            _latLngBounds = latLngBounds;
            return(this);
        }
Пример #2
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());
        }
Пример #3
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);
        }
Пример #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 }
            }));
        }
Пример #5
0
 bool Equals(LatLngBounds other)
 {
     return(Equals(_southwest, other._southwest) && Equals(_northeast, other._northeast));
 }