コード例 #1
0
        /// <summary>
        /// Creates the request parameters for the given path.
        /// </summary>
        /// <param name="path">Path to create request parameters for.</param>
        /// <returns>Request parameters for the given path.</returns>
        protected static string CreatePathParameters(MapPath path)
        {
            var parameters = new ParameterListBuilder(":", "|");

            if (path.Style != null)
            {
                if (path.Style.Weight != null) parameters.Add("weight", path.Style.Weight.ToString());
                if (path.Style.Color != null) parameters.Add("color", path.Style.Color.ToLower());
                if (path.Style.FillColor != null) parameters.Add("fillcolor", path.Style.FillColor.ToLower());
            }

            foreach (var location in path.Locations) parameters.Add(location.ToString());

            return parameters.ToString();
        }
コード例 #2
0
        /// <summary>
        /// Adds the path to the control.
        /// </summary>
        /// <param name="path">Path to add.</param>
        /// <returns></returns>
        public GoogleStaticMapControl AddPath(MapPath path)
        {
            _urlBuilder.Paths.Add(path);

            return this;
        }