How to request traditional chinese (pinyin) - xLocate1
Posted: Fri Apr 22, 2022 8:57 am
Here's an example for how to retrieve the results of a chinese geocoding (China Cluster xS1 - https://china-test.ptvgroup.cn/) in Pinyin (traditional chinese) style:
returns
If you do not specify PYN as output language but rely on the default we return
Code: Select all
{
"address": "Shanghai",
"country": "CN",
"options": [ {"$type": "SearchOption",
"value": "PYN",
"param": "RESULT_LANGUAGE"}
],
"sorting": [],
"additionalFields": [],
"callerContext": {
"properties": [
{
"key": "CoordFormat",
"value": "PTV_MERCATOR"
},
{
"key": "Profile",
"value": "default"
}
]
}
}
Code: Select all
{
"address": "Shanghai",
"country": "CN",
"options": [ {"$type": "SearchOption",
"value": "PYN",
"param": "RESULT_LANGUAGE"}
],
"sorting": [],
"additionalFields": [],
"callerContext": {
"properties": [
{
"key": "CoordFormat",
"value": "PTV_MERCATOR"
},
{
"key": "Profile",
"value": "default"
}
]
}
}
Code: Select all
{
"errorCode": 0,
"resultList": [
{
"$type": "ResultAddress",
"country": "C",
"postCode": "100020",
"city": "朝阳区",
"city2": "",
"street": "霄云路",
"houseNumber": "",
"totalScore": 0,
"detailLevelDescription": "COUNTRY",
"classificationDescription": "NOT_CLASSIFIED",
"coordinates": {
"$type": "Point",
"point": {
"$type": "PlainPoint",
"x": 12950511.723,
"y": 4854575.4003
}
}
},
]
}