location.encode

The location.encode command is used to encode a textual location into a latitude/longitude pair.

TR50 Request


                        {
  "cmd": {
    "command": "location.encode",
    "params": {
      "location": "Port Orchard, WA"
    }
  }
}
      

Request Parameters

Name

Type

Required

Description

location

String

Yes

The textual location to be encoded.

TR50 Response

If the command is sent successfully a success message and params list are returned. Otherwise, an error and error message will be returned.


                        {
  "cmd": {
    "success": true,
    "params": {
      "lat": 30.455,
      "lng": -84.25349
    }
  }
}
      

Response Parameters

Name

Type

Description

lat

Float

The latitude of the encoded location.

lng

Float

The longitude of the encoded location.