From cd4e96c9cf47d5b0afda8eae8036df5c4688a46c Mon Sep 17 00:00:00 2001 From: Ricky Brundritt Date: Fri, 5 May 2017 11:46:58 -0700 Subject: [PATCH] added new map styles --- Source/BingMapsRESTToolkit.csproj | 1 + Source/Enums/ImageResolutionType.cs | 18 ++++++++++++++++++ Source/Enums/ImageryType.cs | 22 +++++++++++++++++++++- Source/Requests/ImageryRequest.cs | 10 ++++++++++ 4 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 Source/Enums/ImageResolutionType.cs diff --git a/Source/BingMapsRESTToolkit.csproj b/Source/BingMapsRESTToolkit.csproj index ff60fbd..9232ae6 100644 --- a/Source/BingMapsRESTToolkit.csproj +++ b/Source/BingMapsRESTToolkit.csproj @@ -41,6 +41,7 @@ + diff --git a/Source/Enums/ImageResolutionType.cs b/Source/Enums/ImageResolutionType.cs new file mode 100644 index 0000000..e112f1f --- /dev/null +++ b/Source/Enums/ImageResolutionType.cs @@ -0,0 +1,18 @@ +namespace BingMapsRESTToolkit +{ + /// + /// An enumeration for image resolution. + /// + public enum ImageResolutionType + { + /// + /// The default resolution. + /// + Default, + + /// + /// High DPI resolution. + /// + High + } +} diff --git a/Source/Enums/ImageryType.cs b/Source/Enums/ImageryType.cs index 50a540a..bbd5efd 100644 --- a/Source/Enums/ImageryType.cs +++ b/Source/Enums/ImageryType.cs @@ -50,10 +50,30 @@ namespace BingMapsRESTToolkit BirdseyeWithLabels, /// - /// Roads without additional imagery. + /// A dark version of the road maps. + /// + CanvasDark, + + /// + /// A lighter version of the road maps which also has some of the details such as hill shading disabled. + /// + CanvasLight, + + /// + /// A grayscale version of the road maps. + /// + CanvasGray, + + /// + /// Roads without additional imagery. Uses legacy static tile service. /// Road, + /// + /// Roads without additional imagery. Uses dynamic tile service. + /// + RoadOnDemand, + /// /// Ordnance Survey imagery. /// diff --git a/Source/Requests/ImageryRequest.cs b/Source/Requests/ImageryRequest.cs index 0143e5f..2ccdb0b 100644 --- a/Source/Requests/ImageryRequest.cs +++ b/Source/Requests/ImageryRequest.cs @@ -191,6 +191,11 @@ namespace BingMapsRESTToolkit /// public RouteOptions RouteOptions { get; set; } + /// + /// Specifies the resolution of the labels on the image to retrieve. + /// + public ImageResolutionType Resolution { get; set; } + #endregion #region Public Methods @@ -282,6 +287,11 @@ namespace BingMapsRESTToolkit sb.Append("&he=1"); } + if(Resolution == ImageResolutionType.High) + { + sb.Append("&dpi=Large"); + } + //Routing Parameters if (isRoute)