Loading...
Searching...
No Matches
com.navigine.idl.java.Sublocation Class Referenceabstract

Class is used for storing sublocation parameters: identifier, name, width, heigth, etc. More...

Public Member Functions

abstract android.graphics.Bitmap getImage (Integer maxTextureSize)
 Method is used to obtain origin sublocation image with specified maxTextureSize.
 
abstract LocationPoint globalToLocal (GlobalPoint globalPoint)
 
abstract GlobalPoint localToGlobal (LocationPoint localPoint)
 Method is used for converting the local sublocation coordinates to the global geographic coordinates (latitude and longitude) using the geographic binding of the sublocation.
 
abstract Graph getGraph (String tag)
 Method is used to obtain graph (within the current sublocation) with the specified identifier or null if no such graph.
 
abstract Venue getVenueById (int id)
 Method returns the venue (within the current sublocation) with the specified identifier or null if no such venue exists.
 
abstract Zone getZoneById (int id)
 Method returns the zone (within the current sublocation) with the specified identifier or null if no such zone exists.
 
abstract int getId ()
 sublocation's identifier.
 
abstract int getLocation ()
 location's identifier to which the sublocation belongs. Java code snippet:
 
abstract String getName ()
 sublocation's name. Java code snippet:
 
abstract float getWidth ()
 sublocation's width in meters. Java code snippet:
 
abstract float getHeight ()
 sublocation's height in meters. Java code snippet:
 
abstract Float getAltitude ()
 sublocation's altitude in meters if specified. Java code snippet:
 
abstract float getAzimuth ()
 sublocation's azimuth in degrees clockwise. Java code snippet:
 
abstract GlobalPoint getOriginPoint ()
 sublocation's center point in WGS84 coordinates GlobalPoint. Java code snippet:
 
abstract String getLevelId ()
 sublocation's levelId. Java code snippet:
 
abstract String getExternalId ()
 sublocation's externalId. Java code snippet:
 
abstract ArrayList< BeacongetBeacons ()
 List of beacons, attached to this sublocation Beacon. Java code snippet:
 
abstract ArrayList< EddystonegetEddystones ()
 List of eddystones, attached to this sublocation Eddystone. Java code snippet:
 
abstract ArrayList< WifigetWifis ()
 List of wifis, attached to this sublocation Wifi. Java code snippet:
 
abstract ArrayList< VenuegetVenues ()
 List of venues, attached to this sublocation Venue. Java code snippet:
 
abstract ArrayList< ZonegetZones ()
 List of zones, attached to this sublocation Zone. Java code snippet:
 

Detailed Description

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 getSublocations.

Referenced from Location.

Definition at line 19 of file Sublocation.java.

Member Function Documentation

◆ getAltitude()

abstract Float com.navigine.idl.java.Sublocation.getAltitude ( )
abstract

sublocation's altitude in meters if specified. Java code snippet:

Returns
// Get sublocation altitude in meters
Double altitude = sublocation.getAltitude();
if (altitude != null) {
System.out.println("Sublocation altitude: " + altitude + " meters");
}

Kotlin code snippet:

// Get sublocation altitude in meters
val altitude = sublocation.altitude
altitude?.let { println("Sublocation altitude: $it meters") }

◆ getAzimuth()

abstract float com.navigine.idl.java.Sublocation.getAzimuth ( )
abstract

sublocation's azimuth in degrees clockwise. Java code snippet:

Returns
// Get sublocation azimuth in degrees
double azimuth = sublocation.getAzimuth();
System.out.println("Sublocation azimuth: " + azimuth + " degrees");

Kotlin code snippet:

// Get sublocation azimuth in degrees
val azimuth = sublocation.azimuth
println("Sublocation azimuth: $azimuth degrees")

◆ getBeacons()

abstract ArrayList< Beacon > com.navigine.idl.java.Sublocation.getBeacons ( )
abstract

List of beacons, attached to this sublocation Beacon. Java code snippet:

Returns
// Get beacons
java.util.ArrayList<Beacon> beacons = sublocation.getBeacons();
System.out.println("Number of beacons: " + beacons.size());

Kotlin code snippet:

// Get beacons
val beacons = sublocation.beacons
println("Number of beacons: ${beacons.size}")

◆ getEddystones()

abstract ArrayList< Eddystone > com.navigine.idl.java.Sublocation.getEddystones ( )
abstract

List of eddystones, attached to this sublocation Eddystone. Java code snippet:

Returns
// Get Eddystone beacons
java.util.ArrayList<Eddystone> eddystones = sublocation.getEddystones();
System.out.println("Number of Eddystone beacons: " + eddystones.size());

Kotlin code snippet:

// Get Eddystone beacons
val eddystones = sublocation.eddystones
println("Number of Eddystone beacons: ${eddystones.size}")

◆ getExternalId()

abstract String com.navigine.idl.java.Sublocation.getExternalId ( )
abstract

sublocation's externalId. Java code snippet:

Returns
// Get sublocation external ID
String externalId = sublocation.getExternalId();
System.out.println("Sublocation external ID: " + externalId);

Kotlin code snippet:

// Get sublocation external ID
val externalId = sublocation.externalId
println("Sublocation external ID: $externalId")

◆ getGraph()

abstract Graph com.navigine.idl.java.Sublocation.getGraph ( String tag)
abstract

Method is used to obtain graph (within the current sublocation) with the specified identifier or null if no such graph.

Parameters
taggraph tag.
Returns
found graph or null Graph.

Java code snippet:

// Get graph
Graph graph = sublocation.getGraph();
if (graph != null) {
}

Kotlin code snippet:

// Get graph
val graph = sublocation.graph
graph?.let { demonstrateGraphUsage(it) }

◆ getHeight()

abstract float com.navigine.idl.java.Sublocation.getHeight ( )
abstract

sublocation's height in meters. Java code snippet:

Returns
// Get sublocation height in meters
double height = sublocation.getHeight();
System.out.println("Sublocation height: " + height + " meters");

Kotlin code snippet:

// Get sublocation height in meters
val height = sublocation.height
println("Sublocation height: $height meters")

◆ getId()

abstract int com.navigine.idl.java.Sublocation.getId ( )
abstract

sublocation's identifier.

Returns

Java code snippet:

// Get sublocation ID
int sublocationId = sublocation.getId();
System.out.println("Sublocation ID: " + sublocationId);

Kotlin code snippet:

// Get sublocation ID
val sublocationId = sublocation.id
println("Sublocation ID: $sublocationId")

◆ getImage()

abstract android.graphics.Bitmap com.navigine.idl.java.Sublocation.getImage ( Integer maxTextureSize)
abstract

Method is used to obtain origin sublocation image with specified maxTextureSize.

Parameters
maxTextureSizemaximum texure size to render.
Returns
platform image.

Java code snippet:

// Get sublocation image
ImageWrapper image = sublocation.getImage(1024); // max texture size 1024
if (image != null) {
System.out.println("Sublocation image obtained with max texture size 1024");
}

Kotlin code snippet:

// Get sublocation image
val image = sublocation.getImage(1024) // max texture size 1024
image?.let { println("Sublocation image obtained with max texture size 1024") }

◆ getLevelId()

abstract String com.navigine.idl.java.Sublocation.getLevelId ( )
abstract

sublocation's levelId. Java code snippet:

Returns
// Get sublocation level ID
String levelId = sublocation.getLevelId();
System.out.println("Sublocation level ID: " + levelId);

Kotlin code snippet:

// Get sublocation level ID
val levelId = sublocation.levelId
println("Sublocation level ID: $levelId")

◆ getLocation()

abstract int com.navigine.idl.java.Sublocation.getLocation ( )
abstract

location's identifier to which the sublocation belongs. Java code snippet:

Returns
// Get location ID
int locationId = sublocation.getLocation();
System.out.println("Sublocation location ID: " + locationId);

Kotlin code snippet:

// Get location ID
val locationId = sublocation.location
println("Sublocation location ID: $locationId")

◆ getName()

abstract String com.navigine.idl.java.Sublocation.getName ( )
abstract

sublocation's name. Java code snippet:

Returns
// Get sublocation name
String sublocationName = sublocation.getName();
System.out.println("Sublocation name: " + sublocationName);

Kotlin code snippet:

// Get sublocation name
val sublocationName = sublocation.name
println("Sublocation name: $sublocationName")

◆ getOriginPoint()

abstract GlobalPoint com.navigine.idl.java.Sublocation.getOriginPoint ( )
abstract

sublocation's center point in WGS84 coordinates GlobalPoint. Java code snippet:

Returns
// Get sublocation origin point in WGS84 coordinates
GlobalPoint originPoint = sublocation.getOriginPoint();
System.out.println("Sublocation origin point: " + originPoint.getLat() + ", " + originPoint.getLon());

Kotlin code snippet:

// Get sublocation origin point in WGS84 coordinates
val originPoint = sublocation.originPoint
println("Sublocation origin point: ${originPoint.lat}, ${originPoint.lon}")

◆ getVenueById()

abstract Venue com.navigine.idl.java.Sublocation.getVenueById ( int id)
abstract

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

Parameters
idvenue unique identifier.
Returns
found venue object or null Venue.

Java code snippet:

// Get venue by ID
if (!venues.isEmpty()) {
Venue venueById = sublocation.getVenueById(venues.get(0).getId());
if (venueById != null) {
System.out.println("Found venue by ID: " + venueById.getId());
}
}

Kotlin code snippet:

// Get venue by ID
if (venues.isNotEmpty()) {
val venueById = sublocation.getVenueById(venues.first().id)
venueById?.let {
println("Found venue by ID: ${it.id}")
demonstrateVenueUsage(it)
}
}

◆ getVenues()

abstract ArrayList< Venue > com.navigine.idl.java.Sublocation.getVenues ( )
abstract

List of venues, attached to this sublocation Venue. Java code snippet:

Returns
// Get venues
java.util.ArrayList<Venue> venues = sublocation.getVenues();
System.out.println("Number of venues: " + venues.size());

Kotlin code snippet:

// Get venues
val venues = sublocation.venues
println("Number of venues: ${venues.size}")

◆ getWidth()

abstract float com.navigine.idl.java.Sublocation.getWidth ( )
abstract

sublocation's width in meters. Java code snippet:

Returns
// Get sublocation width in meters
double width = sublocation.getWidth();
System.out.println("Sublocation width: " + width + " meters");

Kotlin code snippet:

// Get sublocation width in meters
val width = sublocation.width
println("Sublocation width: $width meters")

◆ getWifis()

abstract ArrayList< Wifi > com.navigine.idl.java.Sublocation.getWifis ( )
abstract

List of wifis, attached to this sublocation Wifi. Java code snippet:

Returns
// Get WiFi access points
java.util.ArrayList<Wifi> wifis = sublocation.getWifis();
System.out.println("Number of WiFi access points: " + wifis.size());

Kotlin code snippet:

// Get WiFi access points
val wifis = sublocation.wifis
println("Number of WiFi access points: ${wifis.size}")

◆ getZoneById()

abstract Zone com.navigine.idl.java.Sublocation.getZoneById ( int id)
abstract

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

Parameters
idzone unique identifier.
Returns
found zone object or null Zone.

Java code snippet:

// Get zone by ID
if (!zones.isEmpty()) {
Zone zoneById = sublocation.getZoneById(zones.get(0).getId());
if (zoneById != null) {
System.out.println("Found zone by ID: " + zoneById.getId());
}
}

Kotlin code snippet:

// Get zone by ID
if (zones.isNotEmpty()) {
val zoneById = sublocation.getZoneById(zones.first().id)
zoneById?.let {
println("Found zone by ID: ${it.id}")
demonstrateZoneUsage(it)
}
}

◆ getZones()

abstract ArrayList< Zone > com.navigine.idl.java.Sublocation.getZones ( )
abstract

List of zones, attached to this sublocation Zone. Java code snippet:

Returns
// Get zones
java.util.ArrayList<Zone> zones = sublocation.getZones();
System.out.println("Number of zones: " + zones.size());

Kotlin code snippet:

// Get zones
val zones = sublocation.zones
println("Number of zones: ${zones.size}")

◆ globalToLocal()

abstract LocationPoint com.navigine.idl.java.Sublocation.globalToLocal ( GlobalPoint globalPoint)
abstract

Method 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
globalPointpoint in WGS84 coordinates GlobalPoint
Returns
point in metrics coordinates LocationPoint.

Java code snippet:

// Convert global coordinates to local coordinates
GlobalPoint globalPoint = new GlobalPoint(55.7558, 37.6176); // Moscow coordinates
LocationPoint localPoint = sublocation.globalToLocal(globalPoint);
System.out.println("Global point " + globalPoint.getLat() + ", " + globalPoint.getLon() +
" converted to local: " + localPoint.getX() + ", " + localPoint.getY());

Kotlin code snippet:

// Convert global coordinates to local coordinates
val globalPoint = GlobalPoint(55.7558, 37.6176) // Moscow coordinates
val localPoint = sublocation.globalToLocal(globalPoint)
println("Global point ${globalPoint.lat}, ${globalPoint.lon} converted to local: ${localPoint.x}, ${localPoint.y}")

◆ localToGlobal()

abstract GlobalPoint com.navigine.idl.java.Sublocation.localToGlobal ( LocationPoint localPoint)
abstract

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

Parameters
localPointpoint in metrics coordinates LocationPoint
Returns
point in WGS84 coordinates GlobalPoint.

Java code snippet:

// Convert local coordinates to global coordinates
LocationPoint localPoint2 = new LocationPoint(100.0, 200.0);
GlobalPoint globalPoint2 = sublocation.localToGlobal(localPoint2);
System.out.println("Local point " + localPoint2.getX() + ", " + localPoint2.getY() +
" converted to global: " + globalPoint2.getLat() + ", " + globalPoint2.getLon());

Kotlin code snippet:

// Convert local coordinates to global coordinates
val localPoint2 = LocationPoint(100.0, 200.0)
val globalPoint2 = sublocation.localToGlobal(localPoint2)
println("Local point ${localPoint2.x}, ${localPoint2.y} converted to global: ${globalPoint2.lat}, ${globalPoint2.lon}")

The documentation for this class was generated from the following file: