geocoder

package module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2022 License: BSD-3-Clause Imports: 1 Imported by: 0

README

geocoder

PkgGoDev

Interface and implementation for different geocoders.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address added in v0.2.0

type Address struct {
	HouseNumber   string `json:"houseNumber"`
	Road          string `json:"road"`
	Neighbourhood string `json:"neighbourhood"`
	Suburb        string `json:"suburb"`
	Borough       string `json:"borough"`
	City          string `json:"city"`
	State         string `json:"state"`
	Postcode      string `json:"postcode"`
	Country       string `json:"country"`
	CountryCode   string `json:"countryCode"`
}

type BoundingBox added in v0.2.0

type BoundingBox struct {
	Lat1 float64 `json:"lat1"`
	Lat2 float64 `json:"lat2"`
	Lon1 float64 `json:"lon1"`
	Lon2 float64 `json:"lon2"`
}

type Error added in v0.2.0

type Error struct {
	StatusCode int   `json:"statusCode"`
	Error      error `json:"error"`
}

type Geocoder

type Geocoder interface {
	Query(ctx context.Context, text string) (*[]Result, *Error)
}

type Result added in v0.2.0

type Result struct {
	BoundingBox BoundingBox `json:"boundingBox"`
	Lat         float64     `json:"lat"`
	Lon         float64     `json:"lon"`
	DisplayName string      `json:"displayName"`
	Category    string      `json:"category"`
	Type        string      `json:"type"`
	Importance  float64     `json:"importance"`
	Address     Address     `json:"address"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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