MCPcopy Create free account
hub / github.com/OpenBMB/BMTools / get_location

Function get_location

bmtools/tools/map/baidu_map/baidu_api.py:155–162  ·  view source on GitHub ↗

该函数仅适用于中国境内地图(内陆),this function only suitable for locations in Mainland China 根据地址获取地点经纬度, return the coordinates :param address: 地址 :return: 地点经纬度 (纬度, 经度),若无法获取则返回None; return (latitute, longitute)

(address: str)

Source from the content-addressed store, hash-verified

153
154 @tool.get("/get_location")
155 def get_location(address: str) -> Optional[Tuple[float, float]]:
156 """
157 该函数仅适用于中国境内地图(内陆),this function only suitable for locations in Mainland China
158 根据地址获取地点经纬度, return the coordinates
159 :param address: 地址
160 :return: 地点经纬度 (纬度, 经度),若无法获取则返回None; return (latitute, longitute)
161 """
162 return baidu_map.get_location(address)
163
164 @tool.get("/get_address_by_coordinates")
165 def get_address_by_coordinates(lat: float, lng: float) -> Optional[str]:

Callers

nothing calls this directly

Calls 1

get_locationMethod · 0.45

Tested by

no test coverage detected