location

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseGeoLocation

func ParseGeoLocation(longitudeRaw string, latitudeRaw string) (float64, float64, error)

Types

type LocationParameters

type LocationParameters struct {
	Latitude    float64
	Longitude   float64
	MinDistance int64
	MaxDistance int64
}

func LocationParametersFromRequest

func LocationParametersFromRequest(req *http.Request, defaultMaxDistance int64) (*LocationParameters, error)

type ObjectLocation

type ObjectLocation struct {
	Type        string
	Coordinates []float64
}

func NewObjectLocation

func NewObjectLocation(latitude, longitude float64) *ObjectLocation

func (ObjectLocation) MarshalJSON

func (self ObjectLocation) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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