Beispiel #1
0
        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);
        }
Beispiel #2
0
        public Dictionary <string, object> ToDictionary()
        {
            var result = new Dictionary <string, object>();

            if (_position != null)
            {
                result[PositionMethodName] = _position.ToDictionary();
            }

            result[ZIndexMethodName] = _zIndex;

            result[TitleMethodName]   = _title;
            result[SnippetMethodName] = _snippet;

            result[DraggableMethodName]              = _draggable;
            result[VisibleMethodName]                = _visible;
            result[FlatMethodName]                   = _flat;
            result[RotationMethodName]               = _rotation;
            result[AlphaMethodName]                  = _alpha;
            result[AnchorMethodName + "U"]           = _anchorU;
            result[AnchorMethodName + "V"]           = _anchorV;
            result[InfoWindowAnchorMethodName + "U"] = _infoWindowAnchorU;
            result[InfoWindowAnchorMethodName + "V"] = _infoWindowAnchorV;

            if (_imageDescriptor != null)
            {
                switch (_imageDescriptor.DescriptorType)
                {
                case ImageDescriptor.ImageDescriptorType.Default:
                    break;

                case ImageDescriptor.ImageDescriptorType.DefaultWithHue:
                    result["iconHue"] = _imageDescriptor.Hue;
                    break;

                case ImageDescriptor.ImageDescriptorType.AssetName:
                    result[IconMethodName]  = _imageDescriptor.AssetName.ToFullStreamingAssetsPath();
                    result["iconAssetName"] = _imageDescriptor.AssetName;
                    result["iconScale"]     = _imageDescriptor.ScaleOnIos;
                    break;

                case ImageDescriptor.ImageDescriptorType.Texture2D:
                    result["iconBytes"] = Convert.ToBase64String(_imageDescriptor.Texture.EncodeToPNG());
                    break;
                }
            }

            return(result);
        }
Beispiel #3
0
        public Dictionary <string, object> ToDictionary()
        {
            var result = new Dictionary <string, object>();

            result[CenterMethodName]      = _latLng.ToDictionary();
            result[RadiusMethodName]      = _radius;
            result[StrokeWidthMethodName] = _strokeWidth;
            result[StrokeColorMethodName] = _strokeColor.ToDictionary();
            result[FillColorMethodName]   = _fillColor.ToDictionary();
            result[ZIndexMethodName]      = _zIndex;
            result[IsVisibleMethodName]   = _visible;
            result[IsClickableMethodName] = _clickable;

            return(result);
        }