Google.Maps.CountryProvider

This is an abstract class.

The superclass of scripts that determine the user's country.

Summary

Inheritance

Inherits from: MonoBehaviour

Public attributes

DefaultCountryCode = "ZZ"
const string
The fallback country code. Indicates that the user's country can not be determined.

Public functions

GetCountry()
virtual abstract string
Gets the country code (in ISO 3166-1 alpha-2 format) for the user's country.

Public static functions

GetCountryOrDefault(CountryProvider provider)
string
Gets the country code from a CountryProvider. If the provider is null, or if it returns a null or empty country, then this method returns DefaultCountryCode.

Public attributes

DefaultCountryCode

const string DefaultCountryCode = "ZZ"

The fallback country code. Indicates that the user's country can not be determined.

Public functions

GetCountry

virtual abstract string GetCountry()

Gets the country code (in ISO 3166-1 alpha-2 format) for the user's country.

Caution: When this method returns null, or an empty string, or DefaultCountryCode, then the SDK makes no assumptions about the user's location. This can lead to poorly localized or missing names.

Public static functions

GetCountryOrDefault

string GetCountryOrDefault(
  CountryProvider provider
)

Gets the country code from a CountryProvider. If the provider is null, or if it returns a null or empty country, then this method returns DefaultCountryCode.

Details
Parameters
provider
The country provider.