location

package
v0.21.1 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: GPL-3.0 Imports: 7 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

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

GetDistanceBetweenPoints ...

func GetDistanceToPolygon

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

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