geo

package
v0.0.0-...-d6b644b Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Point

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

Point 一个地图坐标点

func ParsePoint

func ParsePoint(src string) (*Point, error)

ParsePoint 从字符串解析 两种格式均可 json格式和短字符串

func (*Point) Scan

func (p *Point) Scan(src interface{}) error

Scan implements the Scanner interface.

func (Point) Short

func (p Point) Short() string

Short 格式化为短字符串

func (Point) String

func (p Point) String() string

String 转换为string类型

func (Point) Value

func (p Point) Value() (driver.Value, error)

Value implements the driver Valuer interface. 存储格式 维度,经度

type Polygon

type Polygon []Point

Polygon 一个地图多边形 有序的顶点列表

func ParsePolygon

func ParsePolygon(src string) (Polygon, error)

ParsePolygon 解析字符串为多边形

func (*Polygon) Scan

func (p *Polygon) Scan(src interface{}) error

Scan implements the Scanner interface.

func (Polygon) Short

func (p Polygon) Short() string

Short 格式化为短字符串

func (Polygon) String

func (p Polygon) String() string

String 转换为string类型

func (Polygon) Value

func (p Polygon) Value() (driver.Value, error)

Value implements the driver Valuer interface. 存储格式 维度,经度

Jump to

Keyboard shortcuts

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