geocode

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithGeocodeCodeAddress

func WithGeocodeCodeAddress(address string) func(*GeocodeCode)

func WithGeocodeRegeoLocation

func WithGeocodeRegeoLocation(location string) func(*GeocodeRegeo)

Types

type AddressComponent

type AddressComponent struct {
	City     string `json:"city,omitempty"`
	Province string `json:"province,omitempty"`
	District string `json:"district,omitempty"`
}

type GeocodeCode

type GeocodeCode struct {
	gaodex.Gaode

	Address string
}

func NewGeocodeCode

func NewGeocodeCode(key string, options ...func(*GeocodeCode)) *GeocodeCode

func (*GeocodeCode) Query

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

type GeocodeCodeItem

type GeocodeCodeItem 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 GeocodeCodeRes

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

type GeocodeRegeo

type GeocodeRegeo struct {
	gaodex.Gaode

	Location string
}

func NewGeocodeRegeo

func NewGeocodeRegeo(key string, options ...func(*GeocodeRegeo)) *GeocodeRegeo

func (*GeocodeRegeo) Query

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

type GeocodeRegeoRes

type GeocodeRegeoRes struct {
	Status    string    `json:"status,omitempty"`
	Regeocode Regeocode `json:"regeocode,omitempty"`
	Info      string    `json:"info,omitempty"`
	Infocode  string    `json:"infocode,omitempty"`
}

type Regeocode

type Regeocode struct {
	AddressComponent AddressComponent `json:"addressComponent,omitempty"`
	FormattedAddress string           `json:"formatted_address,omitempty"`
}

Jump to

Keyboard shortcuts

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