lbs

package
Version: v0.0.0-...-88f6ecf Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2017 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

View Source
const D = 111.044736
View Source
const E float64 = 6378.137 // 地球半径,单位为 km

Variables

This section is empty.

Functions

This section is empty.

Types

type Box

type Box struct {
	Min LngLat
	Max LngLat
}

func BoxFromCenter

func BoxFromCenter(loc LngLat, distance float64) Box

type LngLat

type LngLat struct {
	Longitude float64 `json:"longitude"` //经度
	Latitude  float64 `json:"latitude"`  //纬度
}

func LngLatFromString

func LngLatFromString(value string) LngLat

func (LngLat) Distance

func (L LngLat) Distance(to LngLat) float64

单位 km

func (LngLat) String

func (L LngLat) String() string

type Polygon

type Polygon Polyline

func (Polygon) In

func (P Polygon) In(loc LngLat) bool

type Polyline

type Polyline []LngLat

func PolylineFromString

func PolylineFromString(value string) Polyline

func (Polyline) String

func (L Polyline) String() string

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL