Added support for Imagery Providers

This commit is contained in:
Ricky Brundritt 2017-01-30 10:00:22 -08:00
Родитель 1c44eca247
Коммит 8211e1a259
7 изменённых файлов: 103 добавлений и 32 удалений

Просмотреть файл

@ -10,6 +10,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{833D0345-46F0-486E-9BEF-5269405683F8}"
ProjectSection(SolutionItems) = preProject
..\..\..\..\Source\Repos\Bing-Maps-V8-TypeScript-Definitions\.gitignore = ..\..\..\..\Source\Repos\Bing-Maps-V8-TypeScript-Definitions\.gitignore
CHANGELOG.md = CHANGELOG.md
CONTRIBUTING.md = CONTRIBUTING.md
LICENSE.md = LICENSE.md
README.md = README.md

Просмотреть файл

@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/01/nuspec.xsd">
<metadata>
<id>BingMapsRESTToolkit</id>
<version>1.0.0</version>
<version>1.0.1</version>
<title>Bing Maps REST Services Toolkit</title>
<authors>Microsoft</authors>
<owners>microsoft bingmaps</owners>
@ -27,7 +27,8 @@
<group targetFramework=".NETPortable0.0-net45+win+wpa81+wp80+MonoAndroid10+xamarinios10+MonoTouch10">
<reference file="BingMapsRESTToolkit.dll" />
</group>
<group targetFramework="Xamarin iOS1.0">
<group targetFramework="Unsupported0.0">
<reference file="BingMapsRESTToolkit.dll" />
<reference file="BingMapsRESTToolkit.dll" />
</group>
<group targetFramework="WindowsPhone8.1">
@ -36,9 +37,6 @@
<group targetFramework="Windows4.5.1">
<reference file="BingMapsRESTToolkit.dll" />
</group>
<group targetFramework="Unsupported0.0">
<reference file="BingMapsRESTToolkit.dll" />
</group>
</references>
</metadata>
<files>

3
CHANGELOG.md Normal file
Просмотреть файл

@ -0,0 +1,3 @@
## Version 1.0.1 - 1/30/2017 ##
* Added Imagery Providers to response classes.

Просмотреть файл

@ -50,6 +50,7 @@
<Compile Include="Enums\SeverityType.cs" />
<Compile Include="Enums\TrafficType.cs" />
<Compile Include="Internal\DateTimeHelper.cs" />
<Compile Include="Models\BoundingBox.cs" />
<Compile Include="Models\ImageryPushpin.cs" />
<Compile Include="Models\RouteOptions.cs" />
<Compile Include="Requests\ImageryMetadataRequest.cs" />

Просмотреть файл

@ -0,0 +1,61 @@
using System.Runtime.Serialization;
namespace BingMapsRESTToolkit
{
[DataContract]
public class BoundingBox
{
#region Constructor
public BoundingBox()
{
}
/// <summary>
/// Bounding box generated from edge coordinates.
/// </summary>
/// <param name="edges">The edges of the bounding box. Structure [South Latitude, West Longitude, North Latitude, East Longitude]</param>
public BoundingBox(double[] edges)
{
if (edges != null && edges.Length >= 4)
{
SouthLatitude = edges[0];
WestLongitude = edges[1];
NorthLatitude = edges[2];
EastLongitude = edges[3];
}
}
#endregion
#region Public Properties
[DataMember(Name = "southLatitude", EmitDefaultValue = false)]
public double SouthLatitude { get; set; }
[DataMember(Name = "westLongitude", EmitDefaultValue = false)]
public double WestLongitude { get; set; }
[DataMember(Name = "northLatitude", EmitDefaultValue = false)]
public double NorthLatitude { get; set; }
[DataMember(Name = "eastLongitude", EmitDefaultValue = false)]
public double EastLongitude { get; set; }
#endregion
#region Public Methods
public override string ToString()
{
return string.Format("{0:0.#####},{1:0.#####},{2:0.#####},{3:0.#####}",
SouthLatitude,
WestLongitude,
NorthLatitude,
EastLongitude);
}
#endregion
}
}

Просмотреть файл

@ -53,6 +53,22 @@ namespace BingMapsRESTToolkit
public string PostalCode { get; set; }
}
[DataContract]
public class CoverageArea
{
/// <summary>
/// Bounding box of the coverage area. Structure [South Latitude, West Longitude, North Latitude, East Longitude]
/// </summary>
[DataMember(Name = "bbox", EmitDefaultValue = false)]
public double[] BoundingBox { get; set; }
[DataMember(Name = "zoomMax", EmitDefaultValue = false)]
public int ZoomMax { get; set; }
[DataMember(Name = "zoomMin", EmitDefaultValue = false)]
public int ZoomMin { get; set; }
}
[DataContract]
public class DetailedAddress
{
@ -82,31 +98,6 @@ namespace BingMapsRESTToolkit
public int TilesY { get; set; }
}
[DataContract]
public class BoundingBox
{
[DataMember(Name = "southLatitude", EmitDefaultValue = false)]
public double SouthLatitude { get; set; }
[DataMember(Name = "westLongitude", EmitDefaultValue = false)]
public double WestLongitude { get; set; }
[DataMember(Name = "northLatitude", EmitDefaultValue = false)]
public double NorthLatitude { get; set; }
[DataMember(Name = "eastLongitude", EmitDefaultValue = false)]
public double EastLongitude { get; set; }
public override string ToString()
{
return string.Format("{0:0.#####},{1:0.#####},{2:0.#####},{3:0.#####}",
SouthLatitude,
WestLongitude,
NorthLatitude,
EastLongitude);
}
}
[DataContract]
public class Detail
{
@ -169,6 +160,9 @@ namespace BingMapsRESTToolkit
[DataMember(Name = "imageWidth", EmitDefaultValue = false)]
public int ImageWidth { get; set; }
[DataMember(Name = "imageryProviders", EmitDefaultValue = false)]
public ImageryProvider[] ImageryProviders { get; set; }
[DataMember(Name = "imageUrl", EmitDefaultValue = false)]
public string ImageUrl { get; set; }
@ -188,6 +182,16 @@ namespace BingMapsRESTToolkit
public int ZoomMin { get; set; }
}
[DataContract]
public class ImageryProvider
{
[DataMember(Name = "attribution", EmitDefaultValue = false)]
public string Attribution { get; set; }
[DataMember(Name = "coverageAreas", EmitDefaultValue = false)]
public CoverageArea[] CoverageAreas { get; set; }
}
[DataContract]
public class Instruction
{
@ -403,6 +407,9 @@ namespace BingMapsRESTToolkit
[KnownType(typeof(CompressedPointList))]
public class Resource
{
/// <summary>
/// Bounding box of the response. Structure [South Latitude, West Longitude, North Latitude, East Longitude]
/// </summary>
[DataMember(Name = "bbox", EmitDefaultValue = false)]
public double[] BoundingBox { get; set; }

Просмотреть файл

@ -26,5 +26,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.0.1.0")]
[assembly: AssemblyFileVersion("1.0.1.0")]