Enum google_maps::prelude::Region
source · #[non_exhaustive]#[repr(u16)]pub enum Region {
Show 257 variants
AlandIslands = 0,
Afghanistan = 1,
Albania = 2,
Algeria = 3,
AmericanSamoa = 4,
Andorra = 5,
Angola = 6,
Anguilla = 7,
Antarctica = 8,
AntiguaAndBarbuda = 9,
Argentina = 10,
Armenia = 11,
Aruba = 12,
AscensionIsland = 13,
Australia = 14,
Austria = 15,
Azerbaijan = 16,
Bahamas = 17,
Bahrain = 18,
Bangladesh = 19,
Barbados = 20,
Belarus = 21,
Belgium = 22,
Belize = 23,
Benin = 24,
Bermuda = 25,
Bhutan = 26,
Bolivia = 27,
BosniaAndHerzegovina = 28,
Botswana = 29,
BouvetIsland = 30,
Brazil = 31,
BritishIndianOceanTerritory = 32,
BritishVirginIslands = 33,
Brunei = 34,
Bulgaria = 35,
BurkinaFaso = 36,
Burundi = 37,
Cambodia = 38,
Cameroon = 39,
Canada = 40,
CanaryIslands = 41,
CapeVerde = 42,
CaribbeanNetherlands = 43,
CaymanIslands = 44,
CentralAfricanRepublic = 45,
CeutaAndMelilla = 46,
Chad = 47,
Chile = 48,
China = 49,
ChristmasIsland = 50,
ClippertonIsland = 51,
CocosKeelingIslands = 52,
Colombia = 53,
Comoros = 54,
CongoBrazzaville = 55,
CongoKinshasa = 56,
CookIslands = 57,
CostaRica = 58,
CotedIvoire = 59,
Croatia = 60,
Cuba = 61,
Curacao = 62,
Cyprus = 63,
Czechia = 64,
Denmark = 65,
DiegoGarcia = 66,
Djibouti = 67,
Dominica = 68,
DominicanRepublic = 69,
Ecuador = 70,
Egypt = 71,
ElSalvador = 72,
EquatorialGuinea = 73,
Eritrea = 74,
Estonia = 75,
Eswatini = 76,
Ethiopia = 77,
FalklandIslands = 78,
FaroeIslands = 79,
Fiji = 80,
Finland = 81,
France = 82,
FrenchGuiana = 83,
FrenchPolynesia = 84,
FrenchSouthernTerritories = 85,
Gabon = 86,
Gambia = 87,
Georgia = 88,
Germany = 89,
Ghana = 90,
Gibraltar = 91,
Greece = 92,
Greenland = 93,
Grenada = 94,
Guadeloupe = 95,
Guam = 96,
Guatemala = 97,
Guernsey = 98,
Guinea = 99,
GuineaBissau = 100,
Guyana = 101,
Haiti = 102,
HeardAndMcDonaldIslands = 103,
Honduras = 104,
HongKong = 105,
Hungary = 106,
Iceland = 107,
India = 108,
Indonesia = 109,
Iran = 110,
Iraq = 111,
Ireland = 112,
IsleOfMan = 113,
Israel = 114,
Italy = 115,
Jamaica = 116,
Japan = 117,
Jersey = 118,
Jordan = 119,
Kazakhstan = 120,
Kenya = 121,
Kiribati = 122,
Kosovo = 123,
Kuwait = 124,
Kyrgyzstan = 125,
Laos = 126,
Latvia = 127,
Lebanon = 128,
Lesotho = 129,
Liberia = 130,
Libya = 131,
Liechtenstein = 132,
Lithuania = 133,
Luxembourg = 134,
Macao = 135,
Madagascar = 136,
Malawi = 137,
Malaysia = 138,
Maldives = 139,
Mali = 140,
Malta = 141,
MarshallIslands = 142,
Martinique = 143,
Mauritania = 144,
Mauritius = 145,
Mayotte = 146,
Mexico = 147,
Micronesia = 148,
Moldova = 149,
Monaco = 150,
Mongolia = 151,
Montenegro = 152,
Montserrat = 153,
Morocco = 154,
Mozambique = 155,
Myanmar = 156,
Namibia = 157,
Nauru = 158,
Nepal = 159,
Netherlands = 160,
NewCaledonia = 161,
NewZealand = 162,
Nicaragua = 163,
Niger = 164,
Nigeria = 165,
Niue = 166,
NorfolkIsland = 167,
NorthKorea = 168,
NorthMacedonia = 169,
NorthernMarianaIslands = 170,
Norway = 171,
Oman = 172,
Pakistan = 173,
Palau = 174,
Palestine = 175,
Panama = 176,
PapuaNewGuinea = 177,
Paraguay = 178,
Peru = 179,
Philippines = 180,
PitcairnIslands = 181,
Poland = 182,
Portugal = 183,
PuertoRico = 184,
Qatar = 185,
Romania = 186,
Russia = 187,
Rwanda = 188,
Reunion = 189,
Samoa = 190,
SanMarino = 191,
SaudiArabia = 192,
Senegal = 193,
Serbia = 194,
Seychelles = 195,
SierraLeone = 196,
Singapore = 197,
SintMaarten = 198,
Slovakia = 199,
Slovenia = 200,
SolomonIslands = 201,
Somalia = 202,
SouthAfrica = 203,
SouthGeorgiaAndTheSouthSandwichIslands = 204,
SouthKorea = 205,
SouthSudan = 206,
Spain = 207,
SriLanka = 208,
StBarthelemy = 209,
StHelena = 210,
StKittsAndNevis = 211,
StLucia = 212,
StMartin = 213,
StPierreAndMiquelon = 214,
StVincentAndGrenadines = 215,
Sudan = 216,
Suriname = 217,
SvalbardAndJanMayen = 218,
Sweden = 219,
Switzerland = 220,
Syria = 221,
SaoTomeAndPrincipe = 222,
Taiwan = 223,
Tajikistan = 224,
Tanzania = 225,
Thailand = 226,
TimorLeste = 227,
Togo = 228,
Tokelau = 229,
Tonga = 230,
TrinidadAndTobago = 231,
TristanDaCunha = 232,
Tunisia = 233,
Turkey = 234,
Turkmenistan = 235,
TurksAndCaicosIslands = 236,
Tuvalu = 237,
USOutlyingIslands = 238,
USVirginIslands = 239,
Uganda = 240,
Ukraine = 241,
UnitedArabEmirates = 242,
UnitedKingdom = 243,
UnitedStates = 244,
Uruguay = 245,
Uzbekistan = 246,
Vanuatu = 247,
VaticanCity = 248,
Venezuela = 249,
Vietnam = 250,
WallisAndFutuna = 251,
WesternSahara = 252,
Yemen = 253,
Zambia = 254,
Zimbabwe = 255,
Other = 256,
}
Expand description
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
®ion=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 (Non-exhaustive)§
This enum is marked as non-exhaustive
AlandIslands = 0
Afghanistan = 1
Albania = 2
Algeria = 3
AmericanSamoa = 4
Andorra = 5
Angola = 6
Anguilla = 7
Antarctica = 8
AntiguaAndBarbuda = 9
Argentina = 10
Armenia = 11
Aruba = 12
AscensionIsland = 13
Australia = 14
Austria = 15
Azerbaijan = 16
Bahamas = 17
Bahrain = 18
Bangladesh = 19
Barbados = 20
Belarus = 21
Belgium = 22
Belize = 23
Benin = 24
Bermuda = 25
Bhutan = 26
Bolivia = 27
BosniaAndHerzegovina = 28
Botswana = 29
BouvetIsland = 30
Brazil = 31
BritishIndianOceanTerritory = 32
BritishVirginIslands = 33
Brunei = 34
Bulgaria = 35
BurkinaFaso = 36
Burundi = 37
Cambodia = 38
Cameroon = 39
Canada = 40
CanaryIslands = 41
CapeVerde = 42
CaribbeanNetherlands = 43
CaymanIslands = 44
CentralAfricanRepublic = 45
CeutaAndMelilla = 46
Chad = 47
Chile = 48
China = 49
ChristmasIsland = 50
ClippertonIsland = 51
CocosKeelingIslands = 52
Colombia = 53
Comoros = 54
CongoBrazzaville = 55
CongoKinshasa = 56
CookIslands = 57
CostaRica = 58
CotedIvoire = 59
Croatia = 60
Cuba = 61
Curacao = 62
Cyprus = 63
Czechia = 64
Denmark = 65
DiegoGarcia = 66
Djibouti = 67
Dominica = 68
DominicanRepublic = 69
Ecuador = 70
Egypt = 71
ElSalvador = 72
EquatorialGuinea = 73
Eritrea = 74
Estonia = 75
Eswatini = 76
Ethiopia = 77
FalklandIslands = 78
FaroeIslands = 79
Fiji = 80
Finland = 81
France = 82
FrenchGuiana = 83
FrenchPolynesia = 84
FrenchSouthernTerritories = 85
Gabon = 86
Gambia = 87
Georgia = 88
Germany = 89
Ghana = 90
Gibraltar = 91
Greece = 92
Greenland = 93
Grenada = 94
Guadeloupe = 95
Guam = 96
Guatemala = 97
Guernsey = 98
Guinea = 99
GuineaBissau = 100
Guyana = 101
Haiti = 102
HeardAndMcDonaldIslands = 103
Honduras = 104
HongKong = 105
Hungary = 106
Iceland = 107
India = 108
Indonesia = 109
Iran = 110
Iraq = 111
Ireland = 112
IsleOfMan = 113
Israel = 114
Italy = 115
Jamaica = 116
Japan = 117
Jersey = 118
Jordan = 119
Kazakhstan = 120
Kenya = 121
Kiribati = 122
Kosovo = 123
Kuwait = 124
Kyrgyzstan = 125
Laos = 126
Latvia = 127
Lebanon = 128
Lesotho = 129
Liberia = 130
Libya = 131
Liechtenstein = 132
Lithuania = 133
Luxembourg = 134
Macao = 135
Madagascar = 136
Malawi = 137
Malaysia = 138
Maldives = 139
Mali = 140
Malta = 141
MarshallIslands = 142
Martinique = 143
Mauritania = 144
Mauritius = 145
Mayotte = 146
Mexico = 147
Micronesia = 148
Moldova = 149
Monaco = 150
Mongolia = 151
Montenegro = 152
Montserrat = 153
Morocco = 154
Mozambique = 155
Myanmar = 156
Namibia = 157
Nauru = 158
Nepal = 159
Netherlands = 160
NewCaledonia = 161
NewZealand = 162
Nicaragua = 163
Niger = 164
Nigeria = 165
Niue = 166
NorfolkIsland = 167
NorthKorea = 168
NorthMacedonia = 169
NorthernMarianaIslands = 170
Norway = 171
Oman = 172
Pakistan = 173
Palau = 174
Palestine = 175
Panama = 176
PapuaNewGuinea = 177
Paraguay = 178
Peru = 179
Philippines = 180
PitcairnIslands = 181
Poland = 182
Portugal = 183
PuertoRico = 184
Qatar = 185
Romania = 186
Russia = 187
Rwanda = 188
Reunion = 189
Samoa = 190
SanMarino = 191
SaudiArabia = 192
Senegal = 193
Serbia = 194
Seychelles = 195
SierraLeone = 196
Singapore = 197
SintMaarten = 198
Slovakia = 199
Slovenia = 200
SolomonIslands = 201
Somalia = 202
SouthAfrica = 203
SouthGeorgiaAndTheSouthSandwichIslands = 204
SouthKorea = 205
SouthSudan = 206
Spain = 207
SriLanka = 208
StBarthelemy = 209
StHelena = 210
StKittsAndNevis = 211
StLucia = 212
StMartin = 213
StPierreAndMiquelon = 214
StVincentAndGrenadines = 215
Sudan = 216
Suriname = 217
SvalbardAndJanMayen = 218
Sweden = 219
Switzerland = 220
Syria = 221
SaoTomeAndPrincipe = 222
Taiwan = 223
Tajikistan = 224
Tanzania = 225
Thailand = 226
TimorLeste = 227
Togo = 228
Tokelau = 229
Tonga = 230
TrinidadAndTobago = 231
TristanDaCunha = 232
Tunisia = 233
Turkey = 234
Turkmenistan = 235
TurksAndCaicosIslands = 236
Tuvalu = 237
USOutlyingIslands = 238
USVirginIslands = 239
Uganda = 240
Ukraine = 241
UnitedArabEmirates = 242
UnitedKingdom = 243
UnitedStates = 244
Uruguay = 245
Uzbekistan = 246
Vanuatu = 247
VaticanCity = 248
Venezuela = 249
Vietnam = 250
WallisAndFutuna = 251
WesternSahara = 252
Yemen = 253
Zambia = 254
Zimbabwe = 255
Other = 256
If the country is not recognized by
serde when reading data from
Google it will be assigned to this Other
variant.
As new types are added to Google Maps, they must also be added to this
crate. However, in the meantime, the Other
catch-all variant allows
serde
to read data from Google without producing an error until the
new variant added to this enum
.
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Region
impl<'de> Deserialize<'de> for Region
source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Manual implementation of Deserialize
for serde
. This will take
advantage of the phf
-powered TryFrom
implementation for this type.
source§impl Ord for Region
impl Ord for Region
source§impl PartialEq for Region
impl PartialEq for Region
source§impl PartialOrd for Region
impl PartialOrd for Region
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more