Closed jlrosenlof-kr closed 3 months ago
Hi @jlrosenlof-kr ,
Thanks you for reporting this issue. We'll look into this issue soon!
Hi, There is is spelling error in GeographicEntity. The NeighbourhoodValue is missing an "u". The value is also defined in the generated GeographicEntity, but the property Neighbourhood is missing there.
The entire GeographicEntity cs file could be dropped if the property is moved to the generated one:
public static GeographicEntity Neighbourhood { get; } = new GeographicEntity(NeighbourhoodValue);
/// <summary> Determines if two <see cref="GeographicEntity"/> values are the same. </summary>
The NeighbourhoodValue is already spelled correctly here.
private const string NeighbourhoodValue = "Neighbourhood";
When you fix this, please also add the Neighbourhood property to the MapsAddress and parse it's value in MapsAddress.Serialization.cs.
if (property.NameEquals("neighbourhood"u8))
{
neighbourhood = property.Value.GetString();
continue;
}
It's in the json response, but not added to the class yet. Thank you!
Library name and version
Azure.Maps.Search 1.0.0-beta.4
Describe the bug
I can do an address search with other
GeographicEntity
types such asGeographicEntity.Municipality
andGeographicEntity.MunicipalitySubdivision
but when I try to use theGeographicEntity.Neighborhood
property to set theGeographicEntity
type, I get aRequestFailedException
. The exception lists acceptableGeographicEntity
types and one of the types listed is spelled "Neighbourhood". It seems that either theGeographicEntity.Neighborhood
is setting the wrong string or it is setting the string to be Neighborhood and the Maps API doesn't accept the spelling "Neighborhood".Expected behavior
Use the
GeographicEntity.Neighborhood
property to set theSearchAddressOptions.EntityType
and be able to do a successful address search.Actual behavior
Request fails with the following exception:
Reproduction Steps
This code works:
This code doesn't work:
Environment
OS: Windows 10 .NET runtime version: .NET 5.0.17