Skip to content

Class Sublocation

Il Kadyrov edited this page Oct 1, 2020 · 4 revisions

Sublocation class is used for storing sublocation parameters: identifier, name, width, heigth, etc. The list of sublocations for the current location can be obtained from Location class using public method Location.getSublocations.

Referenced from: Location.

Public methods

Function getId

public int getId()

Function returns the sublocation's identifier.

Function getLocation

public int getLocation()

Function returns the location's identifier.

Function getName

public String getName()

Function returns the sublocation's name.

Function getWidth

public float getWidth()

Function returns the sublocation's width (in meters).

Function getHeight

public float getHeight()

Function returns the sublocation's height (in meters).

Function getAzimuth

public float getAzimuth()

Function returns the sublocation's azimuth angle (in degrees, clockwise).

Function getImageId

public String getImageId()

Function returns the image id, which could be used for getting Image using ResourceManager.

Function getBeacons

public ArrayList<Beacon> getBeacons()

Function returns the list of beacons, attached to this sublocation (see Beacon class).

Function getEddystones

public ArrayList<Eddystone> getEddystones()

Function returns the list of eddystones, attached to this sublocation (see Eddystone class).

Function getWifis

public ArrayList<Wifi> getWifis()

Function returns the list of wifis, attached to this sublocation (see Wifi class).

Function getVenues

public ArrayList<Venue> getVenues()

Function returns the list of venues, attached to this sublocation (see Venue class).

Function getZones

public ArrayList<Zone> getZones()

Function returns the list of zones from this sublocation (see Zone class).

Function localToGlobal

public GlobalPoint localToGlobal(LocationPoint lp)

Function is used for converting the local sublocation coordinates to the global geographic coordinates (latitude and longitude) using the geographic binding of the sublocation.

Parameters
  • lp — the sublocation local point.
Return value

Global point — the geographical latitude and longitude, corresponding to the specified position within the sublocation.

Function globalToLocal

public LocationPoint globalToLocal(GlobalPoint gp)

Function is used for converting the global geographic coordinates (latitude and longitude) to the local sublocation coordinates (x and y) using the geographic binding of the sublocation.

Parameters
  • gp — the global point.
Return value

The location point within the sublocation corresponding to the specified global point.

Function getVenueById

public Venue getVenueById(int id)
Parameters
  • id — the identifier of the venue.
Return value

Function returns the venue (within the current sublocation) with the specified identifier or null if no such venue exists.

Function getZoneById

public Zone getZoneById(int id)
Parameters
  • id — the identifier of the zone.
Return value

Function returns the zone (within the current sublocation) with the specified identifier or null if no such zone exists.

Clone this wiki locally