เอกสาร MapScale
•••
MapScale API
GET/v1/geocode

แปลงชื่อสถานที่หรือที่อยู่เป็นพิกัด

แปลงที่อยู่เป็นพิกัด แปลงพิกัดเป็นที่อยู่ ดู place detail และค้นหาเขตการปกครองไทย

LIVE API PLAYGROUND

เข้าสู่ระบบหรือสร้างบัญชี

ดำเนินการต่อเพื่อเรียก request จริงจากหน้า docs

ส่ง request นี้ไปยัง API จริงและแสดง response จริง

พารามิเตอร์

Request ที่เทียบเท่า
curl \
  -H "X-MapScale-Key: $MAPSCALE_API_KEY" \
  "https://api.mapscale.io/v1/geocode?q=Siam+Paragon&lang=th&limit=5"
Response
Response เริ่มต้น
{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "id": "place_bangkok_123",
      "text": "Siam Paragon",
      "place_name": "Siam Paragon, Pathum Wan, Bangkok",
      "geometry": {
        "type": "Point",
        "coordinates": [
          100.5348,
          13.7466
        ]
      },
      "properties": {
        "latitude": 13.7466,
        "longitude": 100.5348,
        "formattedAddress": "Siam Paragon, Pathum Wan, Bangkok 10330, Thailand",
        "street": "Rama I Road",
        "neighborhood": "Siam",
        "subdistrict": "Pathum Wan",
        "district": "Pathum Wan",
        "province": "Bangkok",
        "postalCode": "10330",
        "country": "Thailand"
      }
    }
  ]
}

Responses

200Geocode resultsapplication/json
400Invalid requestapplication/json
401mapscale/effect-api/UnauthorizedFailureapplication/json
403mapscale/effect-api/ForbiddenFailureapplication/json
404Not foundapplication/json
429mapscale/effect-api/RateLimitedFailureapplication/json
500mapscale/effect-api/MiddlewareInternalFailureapplication/json
502Upstream geocoding engine failureapplication/json
503Upstream geocoding engine unavailable | mapscale/effect-api/UpstreamUnavailableFailureapplication/json

On this page