geocoding

package
v0.0.0-...-795d1ad Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	City     string `json:"city"`
	Country  string `json:"country"`
	LineOne  string `json:"lineOne"`
	LineTwo  string `json:"lineTwo"`
	Postcode string `json:"postcode"`
}

type GeocodingService

type GeocodingService struct {
	// contains filtered or unexported fields
}

func NewGeocodingService

func NewGeocodingService(token string) *GeocodingService

func (*GeocodingService) Lookup

func (t *GeocodingService) Lookup(request *LookupRequest) (*LookupResponse, error)

Lookup returns a geocoded address including normalized address and gps coordinates. All fields are optional, provide more to get more accurate results

func (*GeocodingService) Reverse

func (t *GeocodingService) Reverse(request *ReverseRequest) (*ReverseResponse, error)

Reverse lookup an address from gps coordinates

type Location

type Location struct {
	Latitude  float64 `json:"latitude"`
	Longitude float64 `json:"longitude"`
}

type LookupRequest

type LookupRequest struct {
	Address  string `json:"address"`
	City     string `json:"city"`
	Country  string `json:"country"`
	Postcode string `json:"postcode"`
}

type LookupResponse

type LookupResponse struct {
	Address  *Address  `json:"address"`
	Location *Location `json:"location"`
}

type ReverseRequest

type ReverseRequest struct {
	Latitude  float64 `json:"latitude"`
	Longitude float64 `json:"longitude"`
}

type ReverseResponse

type ReverseResponse struct {
	Address  *Address  `json:"address"`
	Location *Location `json:"location"`
}

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL