aa
This commit is contained in:
@@ -438,3 +438,24 @@ func (c *JobController) ReloadJobSpan() {
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 根据地址查坐标
|
||||
// @Description 根据地址查坐标
|
||||
// @Param token header string true "认证token"
|
||||
// @Param address formData string true "地址"
|
||||
// @Param cityCode formData int true "cityCode"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /GetCoordinateFromAddress [get]
|
||||
func (c *JobController) GetCoordinateFromAddress() {
|
||||
c.callGetCoordinateFromAddress(func(params *tJobGetCoordinateFromAddressParams) (retVal interface{}, errCode string, err error) {
|
||||
place := &struct {
|
||||
Lng float64 `json:"lng"`
|
||||
Lat float64 `json:"lat"`
|
||||
}{}
|
||||
lng, lat, err := api.AutonaviAPI.GetCoordinateFromAddressByPage(params.Address, params.CityCode)
|
||||
place.Lng = lng
|
||||
place.Lat = lat
|
||||
return place, "", err
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user