diff --git a/src/Google.Maps/AvoidHelper.cs b/src/Google.Maps/AvoidHelper.cs index 2b54214..0d88ffe 100644 --- a/src/Google.Maps/AvoidHelper.cs +++ b/src/Google.Maps/AvoidHelper.cs @@ -1,6 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; using System.Text; namespace Google.Maps diff --git a/src/Google.Maps/BaseRequest.cs b/src/Google.Maps/BaseRequest.cs index 243ccff..8580b05 100644 --- a/src/Google.Maps/BaseRequest.cs +++ b/src/Google.Maps/BaseRequest.cs @@ -1,7 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; namespace Google.Maps { diff --git a/src/Google.Maps/Common/IServiceResponse.cs b/src/Google.Maps/Common/IServiceResponse.cs index 8fb304e..49b9524 100644 --- a/src/Google.Maps/Common/IServiceResponse.cs +++ b/src/Google.Maps/Common/IServiceResponse.cs @@ -1,10 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Google.Maps.Common +namespace Google.Maps.Common { public interface IServiceResponse { diff --git a/src/Google.Maps/ComponentFilter.cs b/src/Google.Maps/ComponentFilter.cs index 3a9d029..1b70ab7 100644 --- a/src/Google.Maps/ComponentFilter.cs +++ b/src/Google.Maps/ComponentFilter.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; namespace Google.Maps { diff --git a/src/Google.Maps/Constants.cs b/src/Google.Maps/Constants.cs index 4997844..ba3dca4 100644 --- a/src/Google.Maps/Constants.cs +++ b/src/Google.Maps/Constants.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using System.Text; namespace Google.Maps diff --git a/src/Google.Maps/Direction/DirectionLeg.cs b/src/Google.Maps/Direction/DirectionLeg.cs index 7c0e832..1cbeb58 100644 --- a/src/Google.Maps/Direction/DirectionLeg.cs +++ b/src/Google.Maps/Direction/DirectionLeg.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; -using Newtonsoft.Json; +using Newtonsoft.Json; namespace Google.Maps.Direction { @@ -13,6 +10,9 @@ public class DirectionLeg [JsonProperty("duration")] public ValueText Duration { get; set; } + + [JsonProperty("duration_in_traffic")] + public ValueText DurationInTraffic { get; set; } [JsonProperty("distance")] public ValueText Distance { get; set; } diff --git a/src/Google.Maps/Direction/DirectionRequest.cs b/src/Google.Maps/Direction/DirectionRequest.cs index 0e130be..1003399 100644 --- a/src/Google.Maps/Direction/DirectionRequest.cs +++ b/src/Google.Maps/Direction/DirectionRequest.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Text; -using Google.Maps; using System.ComponentModel; namespace Google.Maps.Direction @@ -24,6 +23,15 @@ public class DirectionRequest : BaseRequest [DefaultValue(TravelMode.driving)] public TravelMode Mode { get; set; } + + /// + /// Specifies the assumptions to use when calculating time in traffic. This setting affects the value returned in the duration_in_traffic field in the response, + /// which contains the predicted time in traffic based on historical averages. The traffic_model parameter may only be specified for driving directions where + /// the request includes a departure_time, and only if the request includes an API key or a Google Maps Platform Premium Plan client ID. + /// + [DefaultValue(TrafficModel.best_guess)] + public TrafficModel TrafficModel { get; set; } + /// /// (optional) Directions may be calculated that adhere to certain restrictions. /// @@ -119,6 +127,7 @@ public override Uri ToUri() .Append("origin", (Origin == null ? (string)null : Origin.GetAsUrlParameter())) .Append("destination", (Destination == null ? (string)null : Destination.GetAsUrlParameter())) .Append("mode", (Mode != TravelMode.driving ? Mode.ToString() : (string)null)) + .Append("traffic_model", (TrafficModel!=TrafficModel.best_guess ? TrafficModel.ToString():(string)null)) .Append("departure_time", (DepartureTime == null ? null : DepartureTime.Value.ToString())) .Append("arrival_time", (ArrivalTime == null ? null : ArrivalTime.Value.ToString())) .Append("waypoints", WaypointsToUri()) diff --git a/src/Google.Maps/Direction/DirectionResponse.cs b/src/Google.Maps/Direction/DirectionResponse.cs index 3df7898..fa5c421 100644 --- a/src/Google.Maps/Direction/DirectionResponse.cs +++ b/src/Google.Maps/Direction/DirectionResponse.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; - -using Newtonsoft.Json; +using Newtonsoft.Json; using Google.Maps.Common; namespace Google.Maps.Direction diff --git a/src/Google.Maps/Direction/DirectionRoute.cs b/src/Google.Maps/Direction/DirectionRoute.cs index fd252a0..86a4317 100644 --- a/src/Google.Maps/Direction/DirectionRoute.cs +++ b/src/Google.Maps/Direction/DirectionRoute.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; -using Newtonsoft.Json; +using Newtonsoft.Json; namespace Google.Maps.Direction { diff --git a/src/Google.Maps/Direction/DirectionStep.cs b/src/Google.Maps/Direction/DirectionStep.cs index bc580b9..86fea75 100644 --- a/src/Google.Maps/Direction/DirectionStep.cs +++ b/src/Google.Maps/Direction/DirectionStep.cs @@ -1,6 +1,4 @@ using System; -using System.Collections.Generic; -using System.Text; using Newtonsoft.Json; namespace Google.Maps.Direction @@ -23,6 +21,9 @@ public class DirectionStep [JsonProperty("duration")] public ValueText Duration { get; set; } + [JsonProperty("duration_in_traffic")] + public ValueText DurationInTraffic { get; set; } + [Obsolete("maneuver is obsolete", false)] public string Maneuver { get; set; } diff --git a/src/Google.Maps/Direction/DirectionTransitDetails.cs b/src/Google.Maps/Direction/DirectionTransitDetails.cs index db7ca0f..5bd6eb7 100644 --- a/src/Google.Maps/Direction/DirectionTransitDetails.cs +++ b/src/Google.Maps/Direction/DirectionTransitDetails.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Newtonsoft.Json; +using Newtonsoft.Json; namespace Google.Maps.Direction { diff --git a/src/Google.Maps/Direction/GeocodedWaypoint.cs b/src/Google.Maps/Direction/GeocodedWaypoint.cs index dc6157f..196e095 100644 --- a/src/Google.Maps/Direction/GeocodedWaypoint.cs +++ b/src/Google.Maps/Direction/GeocodedWaypoint.cs @@ -1,9 +1,5 @@ using Google.Maps.Shared; using Newtonsoft.Json; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; namespace Google.Maps.Direction { diff --git a/src/Google.Maps/Direction/LineInfo.cs b/src/Google.Maps/Direction/LineInfo.cs index c72ba2c..a51faa9 100644 --- a/src/Google.Maps/Direction/LineInfo.cs +++ b/src/Google.Maps/Direction/LineInfo.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Newtonsoft.Json; +using Newtonsoft.Json; namespace Google.Maps.Direction diff --git a/src/Google.Maps/Direction/Polyline.cs b/src/Google.Maps/Direction/Polyline.cs index d3ebe0b..8fff6f5 100644 --- a/src/Google.Maps/Direction/Polyline.cs +++ b/src/Google.Maps/Direction/Polyline.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; -using Newtonsoft.Json; +using Newtonsoft.Json; namespace Google.Maps.Direction { diff --git a/src/Google.Maps/Direction/Stop.cs b/src/Google.Maps/Direction/Stop.cs index 9cac219..7841730 100644 --- a/src/Google.Maps/Direction/Stop.cs +++ b/src/Google.Maps/Direction/Stop.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Newtonsoft.Json; +using Newtonsoft.Json; namespace Google.Maps.Direction { diff --git a/src/Google.Maps/Direction/Time.cs b/src/Google.Maps/Direction/Time.cs index 314f22d..77c4808 100644 --- a/src/Google.Maps/Direction/Time.cs +++ b/src/Google.Maps/Direction/Time.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Newtonsoft.Json; +using Newtonsoft.Json; namespace Google.Maps.Direction { diff --git a/src/Google.Maps/Direction/TransitAgency .cs b/src/Google.Maps/Direction/TransitAgency .cs index c14dde0..32cae6a 100644 --- a/src/Google.Maps/Direction/TransitAgency .cs +++ b/src/Google.Maps/Direction/TransitAgency .cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Newtonsoft.Json; +using Newtonsoft.Json; namespace Google.Maps.Direction diff --git a/src/Google.Maps/Direction/VehicleInfo.cs b/src/Google.Maps/Direction/VehicleInfo.cs index db36781..986523a 100644 --- a/src/Google.Maps/Direction/VehicleInfo.cs +++ b/src/Google.Maps/Direction/VehicleInfo.cs @@ -1,7 +1,4 @@ -using System.Collections.Generic; -using System.Linq; -using System.Text; -using Newtonsoft.Json; +using Newtonsoft.Json; namespace Google.Maps.Direction { diff --git a/src/Google.Maps/DistanceMatrix/DistanceMatrixRequest.cs b/src/Google.Maps/DistanceMatrix/DistanceMatrixRequest.cs index e7b3cdf..e20a78b 100644 --- a/src/Google.Maps/DistanceMatrix/DistanceMatrixRequest.cs +++ b/src/Google.Maps/DistanceMatrix/DistanceMatrixRequest.cs @@ -18,7 +18,6 @@ using System; using System.Collections.Generic; using System.ComponentModel; -using Google.Maps; using System.Text; using System.Linq; diff --git a/src/Google.Maps/DistanceMatrix/DistanceMatrixResponse.cs b/src/Google.Maps/DistanceMatrix/DistanceMatrixResponse.cs index f40b005..8bd761c 100644 --- a/src/Google.Maps/DistanceMatrix/DistanceMatrixResponse.cs +++ b/src/Google.Maps/DistanceMatrix/DistanceMatrixResponse.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Generic; -using Newtonsoft.Json; +using Newtonsoft.Json; using Google.Maps.Common; namespace Google.Maps.DistanceMatrix diff --git a/src/Google.Maps/ExceptionHelper.cs b/src/Google.Maps/ExceptionHelper.cs index 9f8927f..f191301 100644 --- a/src/Google.Maps/ExceptionHelper.cs +++ b/src/Google.Maps/ExceptionHelper.cs @@ -1,8 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace Google.Maps { diff --git a/src/Google.Maps/GMapsImageFormats.cs b/src/Google.Maps/GMapsImageFormats.cs index 159b41f..8137177 100644 --- a/src/Google.Maps/GMapsImageFormats.cs +++ b/src/Google.Maps/GMapsImageFormats.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Google.Maps +namespace Google.Maps { /// /// Represents the different image formats available from the Google Maps API. diff --git a/src/Google.Maps/Geocoding/GeocodeResponse.cs b/src/Google.Maps/Geocoding/GeocodeResponse.cs index 2cd62ef..e542135 100644 --- a/src/Google.Maps/Geocoding/GeocodeResponse.cs +++ b/src/Google.Maps/Geocoding/GeocodeResponse.cs @@ -17,7 +17,6 @@ using Google.Maps.Common; using Newtonsoft.Json; -using System; namespace Google.Maps.Geocoding { diff --git a/src/Google.Maps/Geocoding/Result.cs b/src/Google.Maps/Geocoding/Result.cs index 7ea5404..f97aa6f 100644 --- a/src/Google.Maps/Geocoding/Result.cs +++ b/src/Google.Maps/Geocoding/Result.cs @@ -16,7 +16,6 @@ */ using Newtonsoft.Json; -using System; using Google.Maps.Shared; namespace Google.Maps.Geocoding diff --git a/src/Google.Maps/Google.Maps.csproj b/src/Google.Maps/Google.Maps.csproj index 8510a41..450e7a3 100644 --- a/src/Google.Maps/Google.Maps.csproj +++ b/src/Google.Maps/Google.Maps.csproj @@ -1,18 +1,18 @@  - net461;netstandard1.3 + net7.0 + latest True sn.snk False False + Debug;Release;Release_PathDiagnostics + AnyCPU HAS_SYSTEMDRAWING - - - - + \ No newline at end of file diff --git a/src/Google.Maps/Internal/ConvertUtil.cs b/src/Google.Maps/Internal/ConvertUtil.cs index f2d3196..9cbc40f 100644 --- a/src/Google.Maps/Internal/ConvertUtil.cs +++ b/src/Google.Maps/Internal/ConvertUtil.cs @@ -1,7 +1,5 @@ -using System; -using System.Linq; +using System.Linq; using System.Collections.Generic; -using System.Text; using System.Collections; namespace Google.Maps.Internal diff --git a/src/Google.Maps/Internal/QueryStringBuilder.cs b/src/Google.Maps/Internal/QueryStringBuilder.cs index fadbdef..d2a21d8 100644 --- a/src/Google.Maps/Internal/QueryStringBuilder.cs +++ b/src/Google.Maps/Internal/QueryStringBuilder.cs @@ -15,8 +15,6 @@ * limitations under the License. */ -using System; - namespace Google.Maps.Internal { internal class QueryStringBuilder diff --git a/src/Google.Maps/Internal/RequestUtils.cs b/src/Google.Maps/Internal/RequestUtils.cs index 467bcca..f7fcba4 100644 --- a/src/Google.Maps/Internal/RequestUtils.cs +++ b/src/Google.Maps/Internal/RequestUtils.cs @@ -1,5 +1,4 @@ -using System; -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; using System.Text; diff --git a/src/Google.Maps/Internal/StringCaseExtensions.cs b/src/Google.Maps/Internal/StringCaseExtensions.cs index ab1825c..5683cd2 100644 --- a/src/Google.Maps/Internal/StringCaseExtensions.cs +++ b/src/Google.Maps/Internal/StringCaseExtensions.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using System.Linq; namespace Google.Maps.Internal { diff --git a/src/Google.Maps/Internal/ValueTextComparer.cs b/src/Google.Maps/Internal/ValueTextComparer.cs index 1dc5a15..025aeb6 100644 --- a/src/Google.Maps/Internal/ValueTextComparer.cs +++ b/src/Google.Maps/Internal/ValueTextComparer.cs @@ -1,7 +1,5 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Text; namespace Google.Maps { diff --git a/src/Google.Maps/JsonEnumTypeConverter.cs b/src/Google.Maps/JsonEnumTypeConverter.cs index 905bec7..e899f4d 100644 --- a/src/Google.Maps/JsonEnumTypeConverter.cs +++ b/src/Google.Maps/JsonEnumTypeConverter.cs @@ -16,7 +16,6 @@ */ using System; -using Google.Maps.Geocoding; using Google.Maps.Shared; using Newtonsoft.Json; diff --git a/src/Google.Maps/LatLngComparer.cs b/src/Google.Maps/LatLngComparer.cs index e75a457..d9fce5c 100644 --- a/src/Google.Maps/LatLngComparer.cs +++ b/src/Google.Maps/LatLngComparer.cs @@ -1,7 +1,5 @@ using System; using System.Collections.Generic; -using System.Linq; -using System.Text; namespace Google.Maps { diff --git a/src/Google.Maps/Location.cs b/src/Google.Maps/Location.cs index 870d79d..00fcc5f 100644 --- a/src/Google.Maps/Location.cs +++ b/src/Google.Maps/Location.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Google.Maps +namespace Google.Maps { /// /// A general free-text location, usually for specifying an address or particular place for Google Maps. diff --git a/src/Google.Maps/MapMarker.cs b/src/Google.Maps/MapMarker.cs index d89aaf4..9a29a34 100644 --- a/src/Google.Maps/MapMarker.cs +++ b/src/Google.Maps/MapMarker.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; +using System.Collections.Generic; using System.ComponentModel; namespace Google.Maps diff --git a/src/Google.Maps/MapMarkersCollection.cs b/src/Google.Maps/MapMarkersCollection.cs index e9ed0e2..12b876f 100644 --- a/src/Google.Maps/MapMarkersCollection.cs +++ b/src/Google.Maps/MapMarkersCollection.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; +using System.Collections.Generic; namespace Google.Maps { diff --git a/src/Google.Maps/MapTypes.cs b/src/Google.Maps/MapTypes.cs index f795241..03a2ac1 100644 --- a/src/Google.Maps/MapTypes.cs +++ b/src/Google.Maps/MapTypes.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Google.Maps +namespace Google.Maps { /// /// The available map types for the current Google Maps API. diff --git a/src/Google.Maps/MarkerSizes.cs b/src/Google.Maps/MarkerSizes.cs index 31e49e7..cad3f04 100644 --- a/src/Google.Maps/MarkerSizes.cs +++ b/src/Google.Maps/MarkerSizes.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Google.Maps +namespace Google.Maps { /// /// The set of marker sizes available for the current Google Maps API. diff --git a/src/Google.Maps/Path.cs b/src/Google.Maps/Path.cs index f67eddb..069b0d0 100644 --- a/src/Google.Maps/Path.cs +++ b/src/Google.Maps/Path.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; +using System.Collections.Generic; using System.ComponentModel; namespace Google.Maps diff --git a/src/Google.Maps/Places/Autocomplete/AutocompleteRequest.cs b/src/Google.Maps/Places/Autocomplete/AutocompleteRequest.cs index 5f0e9e8..6c36601 100644 --- a/src/Google.Maps/Places/Autocomplete/AutocompleteRequest.cs +++ b/src/Google.Maps/Places/Autocomplete/AutocompleteRequest.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; using Google.Maps.Internal; namespace Google.Maps.Places diff --git a/src/Google.Maps/Places/Autocomplete/AutocompleteResponse.cs b/src/Google.Maps/Places/Autocomplete/AutocompleteResponse.cs index 9b72a35..5c0d753 100644 --- a/src/Google.Maps/Places/Autocomplete/AutocompleteResponse.cs +++ b/src/Google.Maps/Places/Autocomplete/AutocompleteResponse.cs @@ -1,8 +1,4 @@ using Newtonsoft.Json; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; namespace Google.Maps.Places { diff --git a/src/Google.Maps/Places/Autocomplete/AutocompleteResult.cs b/src/Google.Maps/Places/Autocomplete/AutocompleteResult.cs index 890c223..8eeb3f7 100644 --- a/src/Google.Maps/Places/Autocomplete/AutocompleteResult.cs +++ b/src/Google.Maps/Places/Autocomplete/AutocompleteResult.cs @@ -1,8 +1,4 @@ using Newtonsoft.Json; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; namespace Google.Maps.Places { diff --git a/src/Google.Maps/Places/Details/PlaceDetailsRequest.cs b/src/Google.Maps/Places/Details/PlaceDetailsRequest.cs index 9184627..ce326c9 100644 --- a/src/Google.Maps/Places/Details/PlaceDetailsRequest.cs +++ b/src/Google.Maps/Places/Details/PlaceDetailsRequest.cs @@ -1,7 +1,5 @@ using System; -using System.Collections.Generic; using System.Linq; -using System.Text; namespace Google.Maps.Places.Details { diff --git a/src/Google.Maps/Places/Details/PlaceDetailsResponse.cs b/src/Google.Maps/Places/Details/PlaceDetailsResponse.cs index 4a64671..ba276fe 100644 --- a/src/Google.Maps/Places/Details/PlaceDetailsResponse.cs +++ b/src/Google.Maps/Places/Details/PlaceDetailsResponse.cs @@ -1,8 +1,4 @@ using Newtonsoft.Json; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; namespace Google.Maps.Places.Details { diff --git a/src/Google.Maps/Places/Details/Scope.cs b/src/Google.Maps/Places/Details/Scope.cs index eb623ce..abd80ea 100644 --- a/src/Google.Maps/Places/Details/Scope.cs +++ b/src/Google.Maps/Places/Details/Scope.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace Google.Maps.Places.Details +namespace Google.Maps.Places.Details { public enum Scope { diff --git a/src/Google.Maps/Places/PlacesResult.cs b/src/Google.Maps/Places/PlacesResult.cs index 315948c..b706d8b 100644 --- a/src/Google.Maps/Places/PlacesResult.cs +++ b/src/Google.Maps/Places/PlacesResult.cs @@ -17,7 +17,6 @@ using Google.Maps.Shared; using Newtonsoft.Json; -using System; namespace Google.Maps.Places { diff --git a/src/Google.Maps/Properties/AssemblyInfo.cs b/src/Google.Maps/Properties/AssemblyInfo.cs index 022dc41..0bb88cb 100644 --- a/src/Google.Maps/Properties/AssemblyInfo.cs +++ b/src/Google.Maps/Properties/AssemblyInfo.cs @@ -1,6 +1,4 @@ using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information diff --git a/src/Google.Maps/RankBy.cs b/src/Google.Maps/RankBy.cs index a3f0433..180d946 100644 --- a/src/Google.Maps/RankBy.cs +++ b/src/Google.Maps/RankBy.cs @@ -15,12 +15,6 @@ * limitations under the License. */ -using Newtonsoft.Json; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - namespace Google.Maps { public enum RankBy diff --git a/src/Google.Maps/Shared/Geometry.cs b/src/Google.Maps/Shared/Geometry.cs index f38039a..d8d14b6 100644 --- a/src/Google.Maps/Shared/Geometry.cs +++ b/src/Google.Maps/Shared/Geometry.cs @@ -16,7 +16,6 @@ */ using Newtonsoft.Json; -using System; namespace Google.Maps.Shared { diff --git a/src/Google.Maps/Shared/Viewport.cs b/src/Google.Maps/Shared/Viewport.cs index 34a1840..5aa6a88 100644 --- a/src/Google.Maps/Shared/Viewport.cs +++ b/src/Google.Maps/Shared/Viewport.cs @@ -16,7 +16,6 @@ */ using Newtonsoft.Json; -using System; namespace Google.Maps.Shared { diff --git a/src/Google.Maps/StreetView/StreetViewRequest.cs b/src/Google.Maps/StreetView/StreetViewRequest.cs index 619f644..956f231 100644 --- a/src/Google.Maps/StreetView/StreetViewRequest.cs +++ b/src/Google.Maps/StreetView/StreetViewRequest.cs @@ -16,9 +16,6 @@ */ using System; -using System.Linq; -using System.Collections.Generic; - using Google.Maps.Internal; using System.ComponentModel; diff --git a/src/Google.Maps/TimeZone/TimeZoneResponse.cs b/src/Google.Maps/TimeZone/TimeZoneResponse.cs index e28636c..fdcd3b1 100644 --- a/src/Google.Maps/TimeZone/TimeZoneResponse.cs +++ b/src/Google.Maps/TimeZone/TimeZoneResponse.cs @@ -16,7 +16,6 @@ */ using Newtonsoft.Json; -using System; using Google.Maps.Common; namespace Google.Maps.TimeZone diff --git a/src/Google.Maps/TrafficModel.cs b/src/Google.Maps/TrafficModel.cs new file mode 100644 index 0000000..fa7daa6 --- /dev/null +++ b/src/Google.Maps/TrafficModel.cs @@ -0,0 +1,26 @@ +namespace Google.Maps { + /// + /// Specifies the assumptions to use when calculating time in traffic. This setting affects the value returned in the duration_in_traffic field in the response, + /// which contains the predicted time in traffic based on historical averages. The traffic_model parameter may only be specified for driving directions where + /// the request includes a departure_time, and only if the request includes an API key or a Google Maps Platform Premium Plan client ID. + /// + /// + public enum TrafficModel { + /// + /// (default) indicates that the returned duration_in_traffic should be the best estimate of travel time given what is known about both historical + /// traffic conditions and live traffic. Live traffic becomes more important the closer the departure_time is to now. + /// + best_guess, + + /// + /// indicates that the returned duration_in_traffic should be longer than the actual travel time on most days, though occasional days with particularly bad traffic conditions may exceed this value + /// + pessimistic, + + /// + /// indicates that the returned duration_in_traffic should be shorter than the actual travel time on most days, though occasional days with particularly good traffic conditions may be faster than this value. + /// + optimistic, + + } +} diff --git a/src/Google.Maps/TravelMode.cs b/src/Google.Maps/TravelMode.cs index 87ec14f..b4de1b7 100644 --- a/src/Google.Maps/TravelMode.cs +++ b/src/Google.Maps/TravelMode.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Google.Maps +namespace Google.Maps { /// /// When you calculate directions, you may specify which transportation mode to use. By default, directions are calculated as driving directions. The following travel modes are currently supported: diff --git a/src/Google.Maps/Units.cs b/src/Google.Maps/Units.cs index 67f7d43..8320476 100644 --- a/src/Google.Maps/Units.cs +++ b/src/Google.Maps/Units.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Google.Maps +namespace Google.Maps { /// /// When you calculate Directions Matrix, you may specify which Unit system mode to use. diff --git a/src/Google.Maps/ValueText.cs b/src/Google.Maps/ValueText.cs index 5afe2d0..4522ac3 100644 --- a/src/Google.Maps/ValueText.cs +++ b/src/Google.Maps/ValueText.cs @@ -1,6 +1,4 @@ using System; -using System.Collections.Generic; -using System.Text; using Newtonsoft.Json; namespace Google.Maps