location

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// IpApi ...
	IpApi = "http://ip-api.com/json"
	// IPAPI ...
	IPAPI = "https://ipapi.co/json/"
)
View Source
const (
	Miles      = string("M")
	Kilometers = string("K")
)

Variables

This section is empty.

Functions

func GeoLocationFromIP

func GeoLocationFromIP(ip string) (location m.GeoLocation, err error)

GeoLocationFromIP ...

func GetDistanceBetweenPoints added in v0.12.0

func GetDistanceBetweenPoints(point1, point2 m.Point, unit ...string) (distance float64)

GetDistanceBetweenPoints ...

func GetDistanceToPolygon added in v0.12.0

func GetDistanceToPolygon(point1 m.Point, polygon1 []m.Point, unit ...string) (distance float64)

GetDistanceToPolygon ...

func GetRegionInfo

func GetRegionInfo() (info m.RegionInfo, err error)

GetRegionInfo ...

func PointInsidePolygon added in v0.12.0

func PointInsidePolygon(point1 m.Point, polygon1 []m.Point) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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