| GET | /{Workspace}/ReverseGeocode |
|---|
import Foundation
import ServiceStack
/**
* Reprsents a DTO for a reverse geocode request/resonse. Usage is /ReverseGeocode?latitude=1.0&longitude=1.0
*/
public class ReverseGeocode : Codable
{
public var workspace:String
public var address:Address
required public init(){}
}
public class Address : Codable
{
public var street:String
public var unit:String
public var city:String
public var state:String
public var zip:String
public var contactTitle:String
public var contactName:String
public var contactPhone:String
public var contactEmail:String
public var location:Location
public var siteName:String
public var geocodeFailed:Bool
public var country:String
required public init(){}
}
public class Location : Codable
{
public var y:Double
public var x:Double
required public init(){}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /{Workspace}/ReverseGeocode HTTP/1.1
Host: dev.fieldsquared.com
Accept: application/json