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

Function get_coordinates

bmtools/tools/map/bing_map/api.py:54–64  ·  view source on GitHub ↗

Get the coordinates of a location

(location:str)

Source from the content-addressed store, hash-verified

52
53 @tool.get("/get_coordinates")
54 def get_coordinates(location:str):
55 """Get the coordinates of a location"""
56 url = BASE_URL + "Locations"
57 params = {
58 "query": location,
59 "key": KEY
60 }
61 response = requests.get(url, params=params)
62 json_data = response.json()
63 coordinates = json_data["resourceSets"][0]["resources"][0]["point"]["coordinates"]
64 return coordinates
65
66 @tool.get("/search_nearby")
67 def search_nearyby(search_term:str="restaurant", latitude:float = 0.0, longitude:float = 0.0, places:str='unknown', radius:int = 5000): # radius in meters

Callers 1

search_nearybyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected