get_locations()
  • 1 Minute to read

get_locations()


Article summary

get_locations()

Retrieve all saved locations in a specific map.

Reference

Arguments

ArgumentsTypeDefault value
map_namestrThe requested map.

Return

Dict with zone name as key and Dict with data of the zone as value.

KeyTypeInfo
$location_name_0Dictx: x position, y: y position.
$location_name_1Dictx: x position, y: y position.
.........
$location_name_nDictx: 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?