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

Base interface for handling objects on the location view. More...

+ Inheritance diagram for com.navigine.idl.java.MapObject:

Public Member Functions

abstract int getId ()
 Gets the unique identifier of the map object.
 
abstract MapObjectType getType ()
 Gets the type of the map object.
 
abstract byte[] getData ()
 Gets the user-defined data associated with the map object.
 
abstract boolean setVisible (boolean visible)
 Method is used to specify the visibility of the map object.
 
abstract boolean setInteractive (boolean interactive)
 Method is used to specify whether the map object can be interacted with.
 
abstract void setData (byte[] data)
 Method is used to set user-defined data for the map object.
 
abstract boolean setTitle (String title)
 Method is used to set the title of the map object.
 
abstract boolean setAlpha (float alpha)
 Method is used to set the opacity of the map object.
 

Detailed Description

Base interface for handling objects on the location view.

Used to manage objects in LocationWindow. Can be handled in the pickMapObjectAt method LocationWindow.

Referenced from CircleMapObject, IconMapObject, PolylineMapObject, PolygonMapObject, DottedPolylineMapObject.

Definition at line 21 of file MapObject.java.

Member Function Documentation

◆ getData()

abstract byte[] com.navigine.idl.java.MapObject.getData ( )
abstract

Gets the user-defined data associated with the map object.

Returns
The data stored in the map object.

Java code snippet:

// Get custom data
Map<String, String> retrievedData = circleMapObject.getData();
System.out.println("Circle custom data: " + retrievedData);

Kotlin code snippet:

// Get custom data
val retrievedData = circleMapObject!!.data
println("Circle custom data: $retrievedData")

◆ getId()

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

Gets the unique identifier of the map object.

Returns
The unique identifier of the map object.

Java code snippet:

// Get object ID
int objectId = circleMapObject.getId();
System.out.println("Circle object ID: " + objectId);

Kotlin code snippet:

// Get object ID
val objectId = circleMapObject!!.id
println("Circle object ID: $objectId")

◆ getType()

abstract MapObjectType com.navigine.idl.java.MapObject.getType ( )
abstract

Gets the type of the map object.

Returns
The type of the map object MapObjectType.

Java code snippet:

// Get object type
String objectTypeString = circleMapObject.getType();
System.out.println("Circle object type: " + objectTypeString);

Kotlin code snippet:

// Get object type
val objectTypeString = circleMapObject!!.type
println("Circle object type: $objectTypeString")

◆ setAlpha()

abstract boolean com.navigine.idl.java.MapObject.setAlpha ( float alpha)
abstract

Method is used to set the opacity of the map object.

Parameters
alphaOpacity multiplier. Values below 0 will be set to 0. Values above 1 will be set to 1. Default: 1.
Returns
true if the operation is successful, false otherwise.

Java code snippet:

// Set alpha transparency
boolean alphaSuccess = circleMapObject.setAlpha(0.7);
System.out.println("Set circle alpha to 0.7: " + alphaSuccess);

Kotlin code snippet:

// Set alpha transparency
val alphaSuccess = circleMapObject!!.setAlpha(0.7)
println("Set circle alpha to 0.7: $alphaSuccess")

◆ setData()

abstract void com.navigine.idl.java.MapObject.setData ( byte[] data)
abstract

Method is used to set user-defined data for the map object.

Parameters
dataData to store in the map object.

Java code snippet:

// Set custom data
Map<String, String> customData = new HashMap<>();
customData.put("key", "value");
customData.put("number", "42");
boolean dataSuccess = circleMapObject.setData(customData);
System.out.println("Set circle custom data: " + dataSuccess);

Kotlin code snippet:

// Set custom data
val customData = mapOf("key" to "value", "number" to "42")
val dataSuccess = circleMapObject!!.setData(customData)
println("Set circle custom data: $dataSuccess")

◆ setInteractive()

abstract boolean com.navigine.idl.java.MapObject.setInteractive ( boolean interactive)
abstract

Method is used to specify whether the map object can be interacted with.

Parameters
interactiveSpecifies whether the object can be picked in the pickMapObjectAt method (true) or not (false). Default: false.
Returns
true if the operation is successful, false otherwise.

Java code snippet:

// Set interactive mode
boolean interactiveSuccess = circleMapObject.setInteractive(true);
System.out.println("Set circle interactive to true: " + interactiveSuccess);

Kotlin code snippet:

// Set interactive mode
val interactiveSuccess = circleMapObject!!.setInteractive(true)
println("Set circle interactive to true: $interactiveSuccess")

◆ setTitle()

abstract boolean com.navigine.idl.java.MapObject.setTitle ( String title)
abstract

Method is used to set the title of the map object.

Parameters
titleThe title to display on the location view.
Returns
true if the operation is successful, false otherwise.

Java code snippet:

// Set title
boolean titleSuccess = circleMapObject.setTitle("Circle Object");
System.out.println("Set circle title to 'Circle Object': " + titleSuccess);

Kotlin code snippet:

// Set title
val titleSuccess = circleMapObject!!.setTitle("Circle Object")
println("Set circle title to 'Circle Object': $titleSuccess")

◆ setVisible()

abstract boolean com.navigine.idl.java.MapObject.setVisible ( boolean visible)
abstract

Method is used to specify the visibility of the map object.

Parameters
visibleSpecifies whether the object is visible (true) or hidden (false). Default: true.
Returns
true if the operation is successful, false otherwise.

Java code snippet:

// Set visibility
boolean visibleSuccess = circleMapObject.setVisible(true);
System.out.println("Set circle visibility to true: " + visibleSuccess);

Kotlin code snippet:

// Set visibility
val visibleSuccess = circleMapObject!!.setVisible(true)
println("Set circle visibility to true: $visibleSuccess")

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