I am developing the google map api. When I use the Text search API, I set the parameter languagecode=’zh-TW’, but the primaryTypeDisplayName field in the returned josn returns en.
I used it last month It was normal and Chinese was returned, but this week this error occurred.
My code has not been changed. How should I solve it?
Thanks
{
"textQuery": "Taipei 101",
"languageCode": "zh-TW"
}
{
"places": [
{
"name": "places/ChIJH56c2rarQjQRphD9gvC8BhI",
"id": "ChIJH56c2rarQjQRphD9gvC8BhI",
"types": [
"premise"
],
"formattedAddress": "Taipei 101, No. 7信義路五段信義區台北市台灣 110",
"addressComponents": [
{
"longText": "Taipei 101",
"shortText": "Taipei 101",
"types": [
"premise"
],
"languageCode": "en"
},
{
"longText": "7",
"shortText": "7",
"types": [
"street_number"
],
"languageCode": "zh-TW"
},
{
"longText": "信義路五段",
"shortText": "信義路五段",
"types": [
"route"
],
"languageCode": "zh-TW"
},
{
"longText": "西村里",
"shortText": "西村里",
"types": [
"administrative_area_level_3",
"political"
],
"languageCode": "zh-TW"
},
{
"longText": "信義區",
"shortText": "信義區",
"types": [
"administrative_area_level_2",
"political"
],
"languageCode": "zh-TW"
},
{
"longText": "台北市",
"shortText": "台北市",
"types": [
"administrative_area_level_1",
"political"
],
"languageCode": "zh-TW"
},
{
"longText": "台灣",
"shortText": "TW",
"types": [
"country",
"political"
],
"languageCode": "zh-TW"
},
{
"longText": "110",
"shortText": "110",
"types": [
"postal_code"
],
"languageCode": "zh-TW"
}
],
"location": {
"latitude": 25.033976,
"longitude": 121.56453889999999
},
"viewport": {
"low": {
"latitude": 25.032492119708493,
"longitude": 121.56316601970849
},
"high": {
"latitude": 25.0351900802915,
"longitude": 121.56586398029148
}
},
"googleMapsUri": "https://maps.google.com/?cid=1298933283718762662",
"websiteUri": "http://www.taipei-101.com.tw/index_en.htm",
"utcOffsetMinutes": 480,
"adrFormatAddress": "Taipei 101, u003cspan class="street-address"u003eNo. 7信義路五段西村里u003c/spanu003eu003cspan class="locality"u003e信義區u003c/spanu003eu003cspan class="region"u003e台北市u003c/spanu003eu003cspan class="country-name"u003e台灣u003c/spanu003e u003cspan class="postal-code"u003e110u003c/spanu003e",
"iconMaskBaseUri": "https://maps.gstatic.com/mapfiles/place_api/icons/v2/generic_pinlet",
"iconBackgroundColor": "#7B9EB0",
"displayName": {
"text": "Taipei 101",
"languageCode": "en"
},
"primaryTypeDisplayName": {
"text": "Building",
"languageCode": "en"
},
"primaryType": "premise",
"shortFormattedAddress": "信義路五段7號",
"editorialSummary": {
"text": "有 106 層樓的高聳現代摩天大廈,設有燈光特效、商店、餐廳和觀景台。",
"languageCode": "zh-TW"
},
I read the relevant documentation, but didn’t see the instructions.
Testing the APIs Explorer on Google Map Platform also showed the same result.
Kyle Hsieh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.