gaode

package
v0.10.11 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithAddress

func WithAddress(address string) func(*Geocode)

func WithKeywords added in v0.9.7

func WithKeywords(keywords string) func(*Inputtips)

Types

type Gaode

type Gaode struct {
	Key string
}

type Geocode

type Geocode struct {
	Gaode

	Address string
}

func NewGeocode deprecated

func NewGeocode(key string, options ...func(*Geocode)) *Geocode

Deprecated: 已不再维护, 请使用同级geocode目录下对应的方法

func (*Geocode) Query

func (g *Geocode) Query() ([]byte, error)

type GeocodeItem

type GeocodeItem struct {
	FormattedAddress string      `json:"formatted_address,omitempty"`
	Country          string      `json:"country,omitempty"`
	Province         string      `json:"province,omitempty"`
	CityCode         string      `json:"citycode,omitempty"`
	City             interface{} `json:"city,omitempty"`
	District         interface{} `json:"district,omitempty"`
	Township         []string    `json:"township,omitempty"`
	Neighborhood     struct {
		Name []string `json:"name,omitempty"`
		Type []string `json:"type,omitempty"`
	} `json:"neighborhood,omitempty"`
	Building struct {
		Name []string `json:"name,omitempty"`
		Type []string `json:"type,omitempty"`
	} `json:"building,omitempty"`
	Adcode   string   `json:"adcode,omitempty"`
	Street   []string `json:"street,omitempty"`
	Number   []string `json:"number,omitempty"`
	Location string   `json:"location,omitempty"`
	Level    string   `json:"level,omitempty"`
}

type GeocodeRes

type GeocodeRes struct {
	Status   string        `json:"status,omitempty"`
	Info     string        `json:"info,omitempty"`
	InfoCode string        `json:"infocode,omitempty"`
	Count    string        `json:"count,omitempty"`
	Geocodes []GeocodeItem `json:"geocodes,omitempty"`
}

type Inputtips added in v0.9.7

type Inputtips struct {
	Gaode

	Keywords string
}

func NewInputtips added in v0.9.7

func NewInputtips(key string, options ...func(*Inputtips)) *Inputtips

func (*Inputtips) Query added in v0.9.7

func (g *Inputtips) Query() ([]byte, error)

type Tip added in v0.9.7

type Tip struct {
	Name     string      `json:"name,omitempty"`
	District interface{} `json:"district,omitempty"`
	Location interface{} `json:"location,omitempty"`
	Address  interface{} `json:"address,omitempty"`
}

type TipsRes added in v0.9.7

type TipsRes struct {
	Tips     []Tip  `json:"tips,omitempty"`
	Status   string `json:"status,omitempty"`
	Info     string `json:"info,omitempty"`
	Infocode string `json:"infocode,omitempty"`
	Count    string `json:"count,omitempty"`
}

Directories

Path Synopsis
v3

Jump to

Keyboard shortcuts

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