get_locations()
- 1 Minute to read
get_locations()
- 1 Minute to read
Article summary
Did you find this summary helpful?
Thank you for your feedback
get_locations()
Retrieve all saved locations in a specific map.
Reference
Arguments
Arguments | Type | Default value | |
---|---|---|---|
map_name | str | The requested map. |
Return
Dict
with zone name as key and Dict
with data of the zone as value.
Key | Type | Info |
---|---|---|
$location_name_0 | Dict | x: x position, y: y position. |
$location_name_1 | Dict | x: x position, y: y position. |
... | ... | ... |
$location_name_n | Dict | x: x position, y: y position. |
Exceptions
RayaNavNotLocated
RayaNavZonesNotFound
RayaNavUnkownError
See the complete list of navigation exceptions.
Usage Example
Code:
...
class RayaApplication(RayaApplicationBase):
async def setup(self):
self.nav = await self.enable_controller('navigation')
...
async def loop(self):
...
locations = await self.nav.get_locations(map_name='unity_apartment')
self.log.info(locations)
...
See the nav_all_unity_apartment, nav_get_info to check some valid uses.
Was this article helpful?