1. In a custom field (location), the data needs to be stored in JSON format. UI design. See Figure 1.

2. In the API design, the request parameters are longitude and latitude. Since the place name needs to be displayed in the detail API, I need to retrieve the place name based on the longitude and latitude, and then store it in JSON format.
3. The final definition is based on the GeoJSON format. The format is as follows:
JSON
{
"type": "Feature", // GeoJSON 对象的类型,表示这是一个地理要素对象
"geometry": { // (仅用于 Feature 类型)表示地理对象的几何信息
"type": "Point", // GeoJSON 对象的类型,表示一个点
"coordinates": [116.4074, 39.9042] // 表示地理坐标的数组,[经度,纬度]
},
"properties": { // 包含与地理对象相关的属性数据
"name": "Beijing" // 名称
}
}
4. I validated the JSON data on https://geojson.io/ and it passed. It accurately locates Beijing, as expected. See Figure 2.

