/// <summary> /// Creates the request parameters for the given marker. /// </summary> /// <param name="marker">Marker to create request parameters for.</param> /// <returns>Request parameters for the given marker.</returns> protected static string CreateMarkerParameters(MapMarker marker) { var parameters = new ParameterListBuilder(":", "|"); if (marker.Style != null) { if (marker.Style.Color != null) parameters.Add("color", marker.Style.Color.ToLower()); if (marker.Style.Icon != null) parameters.Add("icon", marker.Style.Icon); if (marker.Style.Label != null) parameters.Add("label", marker.Style.Label); if (marker.Style.Size != MapMarkerSize.Default) parameters.Add("size", marker.Style.Size.ToString().ToLower()); if (!marker.Style.Shadow) parameters.Add("shadow", "false"); } foreach (var location in marker.Locations) parameters.Add(location.ToString()); return parameters.ToString(); }
/// <summary> /// Adds the marker to the control. /// </summary> /// <param name="marker">Marker to add.</param> /// <returns></returns> public GoogleStaticMapControl AddMarker(MapMarker marker) { _urlBuilder.Markers.Add(marker); return this; }