Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Microsoft.Maps.Unity.Search

Caden edited this page Jul 2, 2020 · 5 revisions

MapLocation

Contains data about a specific location returned from a MapLocationFinder request.

public class Microsoft.Maps.Unity.Search.MapLocation

Properties

Type Name Summary
MapLocationAddress Address A structured address including common adress components like city, state, neighborhood, country/region, etc.
String DisplayName The name of the location, typically a formatted address.
String EntityType The classification of the location, such as 'Address' or 'Historical Site'.
LatLon Point The latitude and longitude coordinates of the location.

MapLocationAddress

Contains address data for a specific location returned from a geocoding request.

public class Microsoft.Maps.Unity.Search.MapLocationAddress

Properties

Type Name Summary
String AddressLine A string specifying the populated place for the address. This typically refers to a city, but may refer to a suburb or a neighborhood depending on the country/region.
String AdminDistrict A string specifying the subdivision name in the country/region for an address. This element is typically treated as the first order administrative subdivision, but in some cases it is the second, third, or fourth order subdivision in a country/region.
String AdminDistrict2 A string specifying the subdivision name in the country/region for an address. This element is used when there is another level of subdivision information for a location, such as the county.
String CountryCode A string specifying the two-letter ISO country/region code.
String CountryRegion A string specifying the country/region name of an address.
String FormattedAddress Specifies the address in a local format. This address may not include the country/region, e.g. "1 Microsoft Way, Redmond, WA 98052-8300"
String Landmark A string specifying the name of the landmark when there is a landmark associated with an address.
String Locality A string specifying the populated place for the address. This typically refers to a city, but may refer to a suburb or a neighborhood depending on the country/region.
String Neighborhood A string specifying the neighborhood for an address.
String PostalCode A string specifying the post code, postal code, or ZIP Code of an address.

MapLocationFinder

Handles geocoding and reverse geocoding requests. Based on the input query string, which can represent an address or landmark, or the input location represented by a latitude and longitude, the MapLocationFinder will provide richer address information. This API can be used for standard geocoding and reverse geocoding scenarios. It does not currently provide location information from queries using generic business types, e.g. "Coffee", "Pizza", etc.

public static class Microsoft.Maps.Unity.Search.MapLocationFinder

Static Methods

Type Name Summary
Task<MapLocationFinderResult> FindLocations(String query, MapLocationOptions mapLocationOptions = null) Forms and sends a geocoding request to retrieve location infromation for the provided address query.
Task<MapLocationFinderResult> FindLocations(String query, LatLon referenceLocation, MapLocationOptions mapLocationOptions = null) Forms and sends a geocoding request to retrieve location infromation for the provided address query.
Task<MapLocationFinderResult> FindLocations(String query, GeoBoundingBox referenceBoundingBox, MapLocationOptions mapLocationOptions = null) Forms and sends a geocoding request to retrieve location infromation for the provided address query.
Task<MapLocationFinderResult> FindLocationsAt(LatLon location, MapLocationOptions mapLocationOptions = null) Forms and sends a reverse geocoding request by location.

MapLocationFinderResult

Contains status code and result location data for a Microsoft.Maps.Unity.Search.MapLocationFinder request.

public class Microsoft.Maps.Unity.Search.MapLocationFinderResult

Properties

Type Name Summary
IReadOnlyList<MapLocation> Locations Location data returned in the result.
MapLocationFinderStatus Status The status of the result.

MapLocationFinderStatus

Represents the status of a completed MapLocationFinder request.

public enum Microsoft.Maps.Unity.Search.MapLocationFinderStatus
    : Enum, IComparable, IFormattable, IConvertible

Enum

Value Name Summary
0 Success The request completed successfully.
1 Cancel The request was cancelled by the user.
2 BadResponse A fatal parsing error has occured while processing the response.
3 InvalidCredentials The credentials provided for the request were not valid.
4 NetworkFailure A network failure has occured while processing the request.
5 ServerError A server error has occured while processing the request.
6 UnknownError An unknown error has occured while processing the request.
7 EmptyResponse The request succeeded but the response was empty.

MapLocationOptions

Encapsulates various options related to finding locations.

public class Microsoft.Maps.Unity.Search.MapLocationOptions
    : ServiceOptions

Properties

Type Name Summary
Boolean IncludeCountryCode Specifies to include the two-letter ISO country/region code with the address information in the response. By default, MapLocationAddress will not include this.
Boolean IncludeNeighborhood Specifies to include the neighborhood with the address information in the response, if available. By default, MapLocationAddress will not include this.
Int32 MaxResults Specifies the maximum number of locations to return in the response.

Clone this wiki locally