maze

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: MIT Imports: 10 Imported by: 0

README

Maze

Go Report Card Documentation

This repository contains a set of tools to get locations (reverse search) for Geo URIs, location names, and airports. Special thanks to:

Without which this tool could not exist.

Usage

Check https://pkg.go.dev/go.hacdias.com/maze.

License

MIT © Henrique Dias

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Location

type Location struct {
	Latitude  float64 `json:"latitude,omitempty" yaml:"latitude,omitempty" csv:"latitude"`
	Longitude float64 `json:"longitude,omitempty" yaml:"longitude,omitempty" csv:"longitude"`
	Name      string  `json:"name,omitempty" yaml:"name,omitempty" csv:"name"`
	Locality  string  `json:"locality,omitempty" yaml:"locality,omitempty" csv:"locality"`
	Region    string  `json:"region,omitempty" yaml:"region,omitempty" csv:"region"`
	Country   string  `json:"country,omitempty" yaml:"country,omitempty" csv:"country"`
}

func (*Location) Distance

func (l1 *Location) Distance(l2 *Location) float64

Distance returns the distance, in meters, between l1 and l2.

type Maze

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

func NewMaze

func NewMaze(client *http.Client) *Maze

func (*Maze) Airport

func (l *Maze) Airport(query string) (*Location, error)

func (*Maze) Reverse

func (l *Maze) Reverse(lang string, lon, lat float64) (*Location, error)

func (*Maze) ReverseGeoURI

func (l *Maze) ReverseGeoURI(lang, geoUri string) (*Location, error)

func (*Maze) Search

func (l *Maze) Search(lang, query string) (*Location, error)

Jump to

Keyboard shortcuts

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