[][src]Enum google_maps::Region

pub enum Region {
    AlandIslands,
    Afghanistan,
    Albania,
    Algeria,
    AmericanSamoa,
    Andorra,
    Angola,
    Anguilla,
    Antarctica,
    AntiguaAndBarbuda,
    Argentina,
    Armenia,
    Aruba,
    AscensionIsland,
    Australia,
    Austria,
    Azerbaijan,
    Bahamas,
    Bahrain,
    Bangladesh,
    Barbados,
    Belarus,
    Belgium,
    Belize,
    Benin,
    Bermuda,
    Bhutan,
    Bolivia,
    BosniaAndHerzegovina,
    Botswana,
    BouvetIsland,
    Brazil,
    BritishIndianOceanTerritory,
    BritishVirginIslands,
    Brunei,
    Bulgaria,
    BurkinaFaso,
    Burundi,
    Cambodia,
    Cameroon,
    Canada,
    CanaryIslands,
    CapeVerde,
    CaribbeanNetherlands,
    CaymanIslands,
    CentralAfricanRepublic,
    CeutaAndMelilla,
    Chad,
    Chile,
    China,
    ChristmasIsland,
    ClippertonIsland,
    CocosKeelingIslands,
    Colombia,
    Comoros,
    CongoBrazzaville,
    CongoKinshasa,
    CookIslands,
    CostaRica,
    CotedIvoire,
    Croatia,
    Cuba,
    Curacao,
    Cyprus,
    Czechia,
    Denmark,
    DiegoGarcia,
    Djibouti,
    Dominica,
    DominicanRepublic,
    Ecuador,
    Egypt,
    ElSalvador,
    EquatorialGuinea,
    Eritrea,
    Estonia,
    Eswatini,
    Ethiopia,
    FalklandIslands,
    FaroeIslands,
    Fiji,
    Finland,
    France,
    FrenchGuiana,
    FrenchPolynesia,
    FrenchSouthernTerritories,
    Gabon,
    Gambia,
    Georgia,
    Germany,
    Ghana,
    Gibraltar,
    Greece,
    Greenland,
    Grenada,
    Guadeloupe,
    Guam,
    Guatemala,
    Guernsey,
    Guinea,
    GuineaBissau,
    Guyana,
    Haiti,
    HeardAndMcDonaldIslands,
    Honduras,
    HongKong,
    Hungary,
    Iceland,
    India,
    Indonesia,
    Iran,
    Iraq,
    Ireland,
    IsleOfMan,
    Israel,
    Italy,
    Jamaica,
    Japan,
    Jersey,
    Jordan,
    Kazakhstan,
    Kenya,
    Kiribati,
    Kosovo,
    Kuwait,
    Kyrgyzstan,
    Laos,
    Latvia,
    Lebanon,
    Lesotho,
    Liberia,
    Libya,
    Liechtenstein,
    Lithuania,
    Luxembourg,
    Macao,
    Madagascar,
    Malawi,
    Malaysia,
    Maldives,
    Mali,
    Malta,
    MarshallIslands,
    Martinique,
    Mauritania,
    Mauritius,
    Mayotte,
    Mexico,
    Micronesia,
    Moldova,
    Monaco,
    Mongolia,
    Montenegro,
    Montserrat,
    Morocco,
    Mozambique,
    Myanmar,
    Namibia,
    Nauru,
    Nepal,
    Netherlands,
    NewCaledonia,
    NewZealand,
    Nicaragua,
    Niger,
    Nigeria,
    Niue,
    NorfolkIsland,
    NorthKorea,
    NorthMacedonia,
    NorthernMarianaIslands,
    Norway,
    Oman,
    Pakistan,
    Palau,
    Palestine,
    Panama,
    PapuaNewGuinea,
    Paraguay,
    Peru,
    Philippines,
    PitcairnIslands,
    Poland,
    Portugal,
    PuertoRico,
    Qatar,
    Romania,
    Russia,
    Rwanda,
    Reunion,
    Samoa,
    SanMarino,
    SaudiArabia,
    Senegal,
    Serbia,
    Seychelles,
    SierraLeone,
    Singapore,
    SintMaarten,
    Slovakia,
    Slovenia,
    SolomonIslands,
    Somalia,
    SouthAfrica,
    SouthGeorgiaAndTheSouthSandwichIslands,
    SouthKorea,
    SouthSudan,
    Spain,
    SriLanka,
    StBarthelemy,
    StHelena,
    StKittsAndNevis,
    StLucia,
    StMartin,
    StPierreAndMiquelon,
    StVincentAndGrenadines,
    Sudan,
    Suriname,
    SvalbardAndJanMayen,
    Sweden,
    Switzerland,
    Syria,
    SaoTomeAndPrincipe,
    Taiwan,
    Tajikistan,
    Tanzania,
    Thailand,
    TimorLeste,
    Togo,
    Tokelau,
    Tonga,
    TrinidadAndTobago,
    TristanDaCunha,
    Tunisia,
    Turkey,
    Turkmenistan,
    TurksAndCaicosIslands,
    Tuvalu,
    USOutlyingIslands,
    USVirginIslands,
    Uganda,
    Ukraine,
    UnitedArabEmirates,
    UnitedKingdom,
    UnitedStates,
    Uruguay,
    Uzbekistan,
    Vanuatu,
    VaticanCity,
    Venezuela,
    Vietnam,
    WallisAndFutuna,
    WesternSahara,
    Yemen,
    Zambia,
    Zimbabwe,
}

Specifies the region bias.

Region Biasing

You can set the Directions service to return results from a specific region by using the region parameter. This parameter takes a ccTLD (country code top-level domain) argument specifying the region bias. Most ccTLD codes are identical to ISO 3166-1 codes, with some notable exceptions. For example, the United Kingdom's ccTLD is "uk" (.co.uk) while its ISO 3166-1 code is "gb" (technically for the entity of "The United Kingdom of Great Britain and Northern Ireland").

You may utilize any domain in which the main Google Maps application has launched driving directions.

For example, a directions request for "Toledo" to "Madrid" returns appropriate results when region is set to es and "Toledo" is then interpreted as the Spanish city:

https://maps.googleapis.com/maps/api/directions/json?
origin=Toledo&destination=Madrid
&region=es
&key=YOUR_API_KEY

{
    "status": "OK",
    "routes": [ {
        "summary": "AP-41",
        "legs": [ {
            ...
        } ],
        "copyrights": "Map data ©2010 Europa Technologies, Tele Atlas",
        "warnings": [ ],
        "waypoint_order": [ ]
    } ]
}

A directions request for "Toledo" to "Madrid" sent without a region parameter does not return results, because "Toledo" is interpreted as the city in Ohio and not Spain:

https://maps.googleapis.com/maps/api/directions/json?
origin=Toledo&destination=Madrid
&key=YOUR_API_KEY

{
    "status": "ZERO_RESULTS",
    "routes": [ ]
}

Map Coverage Details

The Google Maps team is constantly working to improve our international coverage. Some data, such as public transit routes, are available at a city level and do not appear in this list. Please note that data coverage can change if licensing agreements with the data providers change.

Variants

AlandIslands
Afghanistan
Albania
Algeria
AmericanSamoa
Andorra
Angola
Anguilla
Antarctica
AntiguaAndBarbuda
Argentina
Armenia
Aruba
AscensionIsland
Australia
Austria
Azerbaijan
Bahamas
Bahrain
Bangladesh
Barbados
Belarus
Belgium
Belize
Benin
Bermuda
Bhutan
Bolivia
BosniaAndHerzegovina
Botswana
BouvetIsland
Brazil
BritishIndianOceanTerritory
BritishVirginIslands
Brunei
Bulgaria
BurkinaFaso
Burundi
Cambodia
Cameroon
Canada
CanaryIslands
CapeVerde
CaribbeanNetherlands
CaymanIslands
CentralAfricanRepublic
CeutaAndMelilla
Chad
Chile
China
ChristmasIsland
ClippertonIsland
CocosKeelingIslands
Colombia
Comoros
CongoBrazzaville
CongoKinshasa
CookIslands
CostaRica
CotedIvoire
Croatia
Cuba
Curacao
Cyprus
Czechia
Denmark
DiegoGarcia
Djibouti
Dominica
DominicanRepublic
Ecuador
Egypt
ElSalvador
EquatorialGuinea
Eritrea
Estonia
Eswatini
Ethiopia
FalklandIslands
FaroeIslands
Fiji
Finland
France
FrenchGuiana
FrenchPolynesia
FrenchSouthernTerritories
Gabon
Gambia
Georgia
Germany
Ghana
Gibraltar
Greece
Greenland
Grenada
Guadeloupe
Guam
Guatemala
Guernsey
Guinea
GuineaBissau
Guyana
Haiti
HeardAndMcDonaldIslands
Honduras
HongKong
Hungary
Iceland
India
Indonesia
Iran
Iraq
Ireland
IsleOfMan
Israel
Italy
Jamaica
Japan
Jersey
Jordan
Kazakhstan
Kenya
Kiribati
Kosovo
Kuwait
Kyrgyzstan
Laos
Latvia
Lebanon
Lesotho
Liberia
Libya
Liechtenstein
Lithuania
Luxembourg
Macao
Madagascar
Malawi
Malaysia
Maldives
Mali
Malta
MarshallIslands
Martinique
Mauritania
Mauritius
Mayotte
Mexico
Micronesia
Moldova
Monaco
Mongolia
Montenegro
Montserrat
Morocco
Mozambique
Myanmar
Namibia
Nauru
Nepal
Netherlands
NewCaledonia
NewZealand
Nicaragua
Niger
Nigeria
Niue
NorfolkIsland
NorthKorea
NorthMacedonia
NorthernMarianaIslands
Norway
Oman
Pakistan
Palau
Palestine
Panama
PapuaNewGuinea
Paraguay
Peru
Philippines
PitcairnIslands
Poland
Portugal
PuertoRico
Qatar
Romania
Russia
Rwanda
Reunion
Samoa
SanMarino
SaudiArabia
Senegal
Serbia
Seychelles
SierraLeone
Singapore
SintMaarten
Slovakia
Slovenia
SolomonIslands
Somalia
SouthAfrica
SouthGeorgiaAndTheSouthSandwichIslands
SouthKorea
SouthSudan
Spain
SriLanka
StBarthelemy
StHelena
StKittsAndNevis
StLucia
StMartin
StPierreAndMiquelon
StVincentAndGrenadines
Sudan
Suriname
SvalbardAndJanMayen
Sweden
Switzerland
Syria
SaoTomeAndPrincipe
Taiwan
Tajikistan
Tanzania
Thailand
TimorLeste
Togo
Tokelau
Tonga
TrinidadAndTobago
TristanDaCunha
Tunisia
Turkey
Turkmenistan
TurksAndCaicosIslands
Tuvalu
USOutlyingIslands
USVirginIslands
Uganda
Ukraine
UnitedArabEmirates
UnitedKingdom
UnitedStates
Uruguay
Uzbekistan
Vanuatu
VaticanCity
Venezuela
Vietnam
WallisAndFutuna
WesternSahara
Yemen
Zambia
Zimbabwe

Trait Implementations

impl Clone for Region[src]

impl Debug for Region[src]

impl Default for Region[src]

pub fn default() -> Self[src]

Returns a reasonable default variant for the Region enum type.

impl<'de> Deserialize<'de> for Region[src]

impl Display for Region[src]

pub fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats a Region enum into a string that is presentable to the end user.

impl Eq for Region[src]

impl From<&'_ Region> for String[src]

pub fn from(region: &Region) -> String[src]

Converts a Region enum to a String that contains a region code.

impl Hash for Region[src]

impl Ord for Region[src]

impl PartialEq<Region> for Region[src]

impl PartialOrd<Region> for Region[src]

impl Serialize for Region[src]

impl StructuralEq for Region[src]

impl StructuralPartialEq for Region[src]

impl TryFrom<&'_ str> for Region[src]

type Error = Error

The type returned in the event of a conversion error.

pub fn try_from(region: &str) -> Result<Region, Error>[src]

Gets a Region enum from a String that contains a supported region code.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,