예제 #1
0
        public override string ToString()
        {
            var options = new JsonCollection(false);

            if (Position.HasValue)
            {
                options.Add("position", "google.maps.ControlPosition." + Position.Value.ToString().ToUpperInvariant());
            }

            options.Add("style", "google.maps.MapTypeControlStyle." + Enum.GetName(typeof(MapTypeControlStyle), Style).ToUpperInvariant(), Style != MapTypeControlStyle.Default);

            // TODO :: Review MapType
            if ((mapType == typeof(Map) || mapType.Name == "GMap") && MapTypeIds != null && MapTypeIds.Count > 0)
            {
                var types = new JsArrayCollection();

                foreach (var mapTypeId in MapTypeIds)
                {
                    types.Add(mapTypeId);
                }

                options.Add("mapTypeIds", types);
            }

            return(options.ToString());
        }
예제 #2
0
        public override string ToString()
        {
            var options = new JsonCollection(false);

            options.Add("opened", Opened, Opened, typeof(bool));

            return(options.ToString());
        }
예제 #3
0
        public override string ToString()
        {
            var options = new JsonCollection(false);

            options.Add <string>("elementType", GetElementType());
            options.Add <string>("featureType", GetFeatureType());
            options.Add("stylers", Styler.ToString());

            return(options.ToString());
        }
예제 #4
0
        public override string ToString()
        {
            JsonCollection options = new JsonCollection(false);

            options.Add("heading", Heading.Value, Heading.HasValue, typeof(double));
            options.Add("pitch", Pitch.Value, Pitch.HasValue, typeof(double));
            options.Add("zoom", Zoom.Value, Zoom.HasValue, typeof(int));

            return(options.ToString());
        }
예제 #5
0
        public override string ToString()
        {
            var options = new JsonCollection(false);

            if (Position.HasValue)
            {
                options.Add("position", "google.maps.ControlPosition." + Position.Value.ToString().ToUpperInvariant(), Position.Value != ControlPosition.Top_Left);
            }

            return(options.ToString());
        }
예제 #6
0
        public override string ToString()
        {
            var options = new JsonCollection(false);

            if (Position.HasValue)
            {
                options.Add("position", "google.maps.ControlPosition." + Position.Value.ToString().ToUpperInvariant(), Position.Value != ControlPosition.Top_Left);
            }
            options.Add("style", "google.maps.ZoomControlStyle." + Enum.GetName(typeof(ZoomControlStyle), this.Style).ToUpperInvariant(), this.Style != ZoomControlStyle.Default);

            return(options.ToString());
        }
        public override string ToString()
        {
            JsonCollection options = new JsonCollection(false);

            options.Add <string>("text", JavascriptHelper.PrepareJavascript(Text, false), !string.IsNullOrEmpty(Text));

            if (Color.HasValue)
            {
                options.Add <string>("color", JavascriptHelper.GetStringFromColor(Color.Value));
            }

            if (Fore.HasValue)
            {
                options.Add <string>("fore", JavascriptHelper.GetStringFromColor(Fore.Value));
            }

            if (StarColor.HasValue)
            {
                options.Add <string>("starcolor", JavascriptHelper.GetStringFromColor(StarColor.Value));
            }

            return(options.ToString());
        }