perfahlen / AzureMapsRestServices

.Net 5 library to access AzureMaps Services

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make Double Value (e.g. Heading) Nullable

Crispin-at-Linknode opened this issue · comments

The "optional" Heading parameter in SearchAddressGeocodeRequest is currently not nullable resulting in a &Heading=0 explicitly built into the URL parameters, even though heading is not explicitly set. This can result in undesirable results and if heading is not required/set it should not be built into the URL.
Example for search/address/reverse below where not including the heading returns the closest street (Fisher Court) but current implementation where &Heading=0 is implicitly set returns alternative unexpected street (close, but not closest to query coordinates)

https://atlas.microsoft.com/search/address/reverse/json?subscription-key=[KEY]&returnSpeedLimit=False&returnRoadUse=False&allowFreeformNewline=False&returnMatchType=False&limit=0&query=55.621750,-4.544633&api-version=1.0

Solution, change double value to nullable:

    public double? Heading { get; set; }

will be in next release, it is a bunch of models go through

@Crispin-at-Linknode , updated models in develop branch. So if you've need for it you can use that. Will release a nuget pkg in short

updated and is now available on nuget