Documentation ¶
Index ¶
- Constants
- type BaiduMapSDK
- func (s *BaiduMapSDK) Geocoder(address string, city string) (*ls.Location, error)
- func (s *BaiduMapSDK) GeocoderParams(params *url.Values) (*ls.Location, error)
- func (s *BaiduMapSDK) GetWeatherNow(adcode int64) (*ls.WeatherInfo, error)
- func (s *BaiduMapSDK) IPLocation(ip string) (*ls.IPPosition, error)
- func (s *BaiduMapSDK) IPLocationParams(params url.Values) (*ls.IPPosition, error)
- func (s *BaiduMapSDK) LBSLocation(req *ls.LBSInfo) (*ls.LBSPosition, error)
- func (s *BaiduMapSDK) LBSLocationParams(params LBSLocationReq) (*ls.LBSPosition, error)
- func (s *BaiduMapSDK) ReverseGeocoding(lng, lat float64) (*ls.Address, error)
- func (s *BaiduMapSDK) ReverseGeocodingParams(params url.Values) (*ls.Address, error)
- type DataRes
- type GeocoderRes
- type IPLocationRes
- type LBSLocationReq
- type LBSLocationRes
- type LBSRequestBody
- type LocationInfo
- type NowInfo
- type ResultInfo
- type ReverseGeocodingRes
- type WeatherResponse
Constants ¶
View Source
const ( // 地理编码服务 GeocoderUrl = "http://api.map.baidu.com/geocoding/v3" // 全球逆地理编码服务Url ReverseGeocodingUrl = "http://api.map.baidu.com/reverse_geocoding/v3" // 普通IP定位 IPLocationUrl = "http://api.map.baidu.com/location/ip" // 智能硬件定位 LBSLocationUrl = "https://api.map.baidu.com/locapi/v2" // 天气 WeatherUrl = "http://api.map.baidu.com/weather/v1/" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaiduMapSDK ¶
type BaiduMapSDK struct {
// contains filtered or unexported fields
}
func DefaultBaiduMapSDK ¶
func DefaultBaiduMapSDK(ak string) *BaiduMapSDK
func NewBaiduMapSDK ¶
func NewBaiduMapSDK(ak, output, coordType, retCoordtype string) *BaiduMapSDK
func (*BaiduMapSDK) GeocoderParams ¶
func (*BaiduMapSDK) GetWeatherNow ¶
func (s *BaiduMapSDK) GetWeatherNow(adcode int64) (*ls.WeatherInfo, error)
func (*BaiduMapSDK) IPLocation ¶
func (s *BaiduMapSDK) IPLocation(ip string) (*ls.IPPosition, error)
func (*BaiduMapSDK) IPLocationParams ¶
func (s *BaiduMapSDK) IPLocationParams(params url.Values) (*ls.IPPosition, error)
func (*BaiduMapSDK) LBSLocation ¶
func (s *BaiduMapSDK) LBSLocation(req *ls.LBSInfo) (*ls.LBSPosition, error)
func (*BaiduMapSDK) LBSLocationParams ¶
func (s *BaiduMapSDK) LBSLocationParams(params LBSLocationReq) (*ls.LBSPosition, error)
todo: 未调用成功
func (*BaiduMapSDK) ReverseGeocoding ¶
func (s *BaiduMapSDK) ReverseGeocoding(lng, lat float64) (*ls.Address, error)
func (*BaiduMapSDK) ReverseGeocodingParams ¶
type GeocoderRes ¶
type IPLocationRes ¶
type LBSLocationReq ¶
type LBSLocationRes ¶
type LBSRequestBody ¶
type LBSRequestBody struct { Accesstype int `json:"accesstype"` IMEI string `json:"imei"` IMSI string `json:"imsi"` CDMA int `json:"cdma"` Network string `json:"network"` BTS string `json:"bts"` SMAC string `json:"smac"` ClientIP string `json:"clientip"` Tel string `json:"tel"` MMAC string `json:"mmac"` CTime string `json:"ctime"` }
type LocationInfo ¶
type ResultInfo ¶
type ResultInfo struct { Location LocationInfo `json:"location"` Now NowInfo `json:"now"` }
type ReverseGeocodingRes ¶
type ReverseGeocodingRes struct { Location location `json:"location"` Business string `json:"business"` // 坐标所在商圈信息,如 "人民大学,中关村,苏州街"。最多返回3个。 FormattedAddress string `json:"formatted_address"` // 结构化地址信息 AddressComponent addressComponent `json:"addressComponent"` Pois []*pois `json:"pois"` Roads []*roads `json:"roads"` PoiRegions []*poiRegions `json:"poiRegions"` SematicDesc string `json:"sematic_description"` //当前位置结合POI的语义化结果描述 }
type WeatherResponse ¶
type WeatherResponse struct { Status int64 `json:"status"` Result ResultInfo `json:"result"` Message string `json:"message"` }
Click to show internal directories.
Click to hide internal directories.