函数定义#
GetBicyclingPlan#
详细描述#
GetBicyclingPlan(origin string, destination string, options ...AmapConfigOption) (*BicyclingResult, error)
参数名 | 参数类型 | 参数解释 |
---|
origin | string | |
destination | string | |
options | ...AmapConfigOption | |
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | *BicyclingResult | |
r2 | error | |
GetDistance#
详细描述#
GetDistance(origin string, destination string, options ...AmapConfigOption) (*DistanceResult, error)
参数名 | 参数类型 | 参数解释 |
---|
origin | string | |
destination | string | |
options | ...AmapConfigOption | |
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | *DistanceResult | |
r2 | error | |
GetDrivingPlan#
详细描述#
GetDrivingPlan(origin string, destination string, options ...AmapConfigOption) (*DirectionResponse, error)
参数名 | 参数类型 | 参数解释 |
---|
origin | string | |
destination | string | |
options | ...AmapConfigOption | |
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | *DirectionResponse | |
r2 | error | |
GetGeocode#
详细描述#
GetGeocode(address string, options ...AmapConfigOption) ([]*GeocodeResult, error)
参数名 | 参数类型 | 参数解释 |
---|
address | string | |
options | ...AmapConfigOption | |
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | []*GeocodeResult | |
r2 | error | |
GetIpLocation#
详细描述#
IPLocation locates an IP address or the requester's IP if ip is empty
GetIpLocation(ip string, options ...AmapConfigOption) (*IPLocationResultEx, error)
参数名 | 参数类型 | 参数解释 |
---|
ip | string | |
options | ...AmapConfigOption | |
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | *IPLocationResultEx | |
r2 | error | |
GetNearbyPOI#
详细描述#
SearchNearbyPOI provides simplified location-based POI search
GetNearbyPOI(location string, keywords string, options ...AmapConfigOption) (*SearchPOIResultEx, error)
参数名 | 参数类型 | 参数解释 |
---|
location | string | |
keywords | string | |
options | ...AmapConfigOption | |
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | *SearchPOIResultEx | |
r2 | error | |
GetPOI#
详细描述#
SearchPOI provides simplified keyword-based POI search
GetPOI(keywords string, options ...AmapConfigOption) (*SearchPOIResultEx, error)
参数名 | 参数类型 | 参数解释 |
---|
keywords | string | |
options | ...AmapConfigOption | |
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | *SearchPOIResultEx | |
r2 | error | |
GetPOIDetail#
详细描述#
GetPOIDetail provides simplified POI detail lookup by ID
GetPOIDetail(poiID string, options ...AmapConfigOption) (*POIResultEx, error)
参数名 | 参数类型 | 参数解释 |
---|
poiID | string | |
options | ...AmapConfigOption | |
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | *POIResultEx | |
r2 | error | |
GetReverseGeocode#
详细描述#
GetReverseGeocode(longitude float64, latitude float64, options ...AmapConfigOption) (*RegeoCodeResult, error)
参数名 | 参数类型 | 参数解释 |
---|
longitude | float64 | |
latitude | float64 | |
options | ...AmapConfigOption | |
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | *RegeoCodeResult | |
r2 | error | |
GetTransitPlan#
详细描述#
GetTransitPlan(origin string, destination string, options ...AmapConfigOption) (*TransitResponse, error)
参数名 | 参数类型 | 参数解释 |
---|
origin | string | |
destination | string | |
options | ...AmapConfigOption | |
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | *TransitResponse | |
r2 | error | |
GetWalkingPlan#
详细描述#
GetWalkingPlan(origin string, destination string, options ...AmapConfigOption) (*V5WalkingResponse, error)
参数名 | 参数类型 | 参数解释 |
---|
origin | string | |
destination | string | |
options | ...AmapConfigOption | |
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | *V5WalkingResponse | |
r2 | error | |
GetWeather#
详细描述#
GetWeather(cityCode string, options ...AmapConfigOption) (*WeatherResponse, error)
参数名 | 参数类型 | 参数解释 |
---|
cityCode | string | |
options | ...AmapConfigOption | |
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | *WeatherResponse | |
r2 | error | |
apiKey#
详细描述#
WithApiKey sets the API key in the config.
apiKey(apiKey string) AmapConfigOption
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | AmapConfigOption | |
baseURL#
详细描述#
WithBaseURL sets the base URL in the config.
baseURL(baseURL string) AmapConfigOption
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | AmapConfigOption | |
city#
详细描述#
WithCity sets the city for API requests
city(city string) AmapConfigOption
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | AmapConfigOption | |
extensions#
详细描述#
WithExtensions sets the extensions parameter (base or all)
extensions(extensions string) AmapConfigOption
参数名 | 参数类型 | 参数解释 |
---|
extensions | string | |
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | AmapConfigOption | |
geocodeFilter#
详细描述#
WithGeocodeFilter sets the geocode filter for the Amap API client.
geocodeFilter(filter func(geocodes []*GeocodeResult) *GeocodeResult) AmapConfigOption
参数名 | 参数类型 | 参数解释 |
---|
filter | func(geocodes []*GeocodeResult) *GeocodeResult | |
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | AmapConfigOption | |
page#
详细描述#
WithPage sets the page number for paginated results
page(page int) AmapConfigOption
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | AmapConfigOption | |
pageSize#
详细描述#
WithPageSize sets the page size for paginated results
pageSize(pageSize int) AmapConfigOption
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | AmapConfigOption | |
pocOpts#
详细描述#
WithLowhttpOptions sets the lowhttp options for the Amap API client.
pocOpts(opts ...poc.PocConfigOption) AmapConfigOption
参数名 | 参数类型 | 参数解释 |
---|
opts | ...poc.PocConfigOption | |
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | AmapConfigOption | |
radius#
详细描述#
WithRadius sets the radius for nearby searches
radius(radius int) AmapConfigOption
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | AmapConfigOption | |
sortRule#
详细描述#
WithSortRule sets the sort rule for search results
sortRule(sortRule string) AmapConfigOption
参数名 | 参数类型 | 参数解释 |
---|
sortRule | string | |
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | AmapConfigOption | |
timeout#
详细描述#
WithTimeout sets the HTTP client timeout in the config.
timeout(timeout time.Duration) AmapConfigOption
参数名 | 参数类型 | 参数解释 |
---|
timeout | time.Duration | |
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | AmapConfigOption | |
type#
详细描述#
WithType sets the type parameter for distance calculations
type(typ string) AmapConfigOption
返回值#
返回值(顺序) | 返回值类型 | 返回值解释 |
---|
r1 | AmapConfigOption | |