Documentation ¶
Index ¶
- Constants
- type AMapSDK
- func (s AMapSDK) Geocoder(address string, city string) (*ls.Location, error)
- func (s AMapSDK) GeocoderParams(params url.Values) (*ls.Location, error)
- func (s AMapSDK) GetWeatherNow(adcode int64) (*ls.WeatherInfo, error)
- func (s AMapSDK) IPLocation(ip string) (*ls.IPPosition, error)
- func (s AMapSDK) IPLocationParams(params url.Values) (*ls.IPPosition, error)
- func (s AMapSDK) LBSLocation(req *ls.LBSInfo) (*ls.LBSPosition, error)
- func (s AMapSDK) LBSLocationParams(params url.Values) (*ls.LBSPosition, error)
- func (s AMapSDK) ReverseGeocoding(lng, lat float64) (*ls.Address, error)
- func (s AMapSDK) ReverseGeocodingParams(params url.Values) (*ls.Address, error)
- type Geocode
- type GeocoderRes
- type IPLocationRes
- type LBSLocationRes
- type Live
- type ReverseGeocodingRes
- type WeatherResponse
Constants ¶
View Source
const ( // 地理编码服务 GeocoderUrl = "https://restapi.amap.com/v3/geocode/geo?parameters" // 全球逆地理编码服务Url ReverseGeocodingUrl = "https://restapi.amap.com/v3/geocode/regeo?parameters" // 普通IP定位 IPLocationUrl = "https://restapi.amap.com/v3/ip?parameters" // 智能硬件定位 LBSLocationUrl = "http://apilocate.amap.com/position" // 天气 WeatherUrl = "https://restapi.amap.com/v3/weather/weatherInfo?parameters" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AMapSDK ¶
type AMapSDK struct {
// contains filtered or unexported fields
}
func DefaultAMapSDK ¶
func NewAMapSDK ¶
func (AMapSDK) GeocoderParams ¶
func (AMapSDK) GetWeatherNow ¶
func (s AMapSDK) GetWeatherNow(adcode int64) (*ls.WeatherInfo, error)
func (AMapSDK) IPLocation ¶
func (s AMapSDK) IPLocation(ip string) (*ls.IPPosition, error)
func (AMapSDK) IPLocationParams ¶
func (AMapSDK) LBSLocation ¶
func (AMapSDK) LBSLocationParams ¶
func (AMapSDK) ReverseGeocoding ¶
type Geocode ¶
type Geocode struct { FormattedAddress string `json:"formatted_address"` // 结构化地址信息 Province interface{} `json:"province"` // 省名 City interface{} `json:"city"` // 城市名 District interface{} `json:"district"` // 区县名 Street interface{} `json:"street"` // 街道名 StreetNumber interface{} `json:"number"` // 街道门牌号 AdCode string `json:"adcode"` // 行政区划代码 Location string `json:"location"` // 坐标点 }
type GeocoderRes ¶
type IPLocationRes ¶
type LBSLocationRes ¶
type Live ¶
type Live struct { Province string `json:"province"` City string `json:"city"` Adcode string `json:"adcode"` Weather string `json:"weather"` Temperature string `json:"temperature"` WindDirection string `json:"winddirection"` WindPower string `json:"windpower"` Humidity string `json:"humidity"` ReportTime string `json:"reporttime"` }
type ReverseGeocodingRes ¶
Click to show internal directories.
Click to hide internal directories.