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

Represents an icon object on the location view. More...

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

Public Member Functions

abstract boolean setPosition (LocationPoint point)
 Method is used to specify the center of the icon.
 
abstract boolean setPositionAnimated (LocationPoint point, float duration, AnimationType type)
 Method is used to move the center of the icon with the specified animation.
 
abstract boolean setBitmap (android.graphics.Bitmap bitmap)
 Method is used to specify the bitmap image for the icon.
 
abstract boolean setSize (float width, float height)
 Method is used to specify the size of the icon.
 
abstract boolean setCollisionEnabled (boolean enabled)
 Method is used to enable or disable collision detection for the icon.
 
abstract boolean setAngle (float angle)
 Method is used to specify the rotation angle of the icon.
 
abstract boolean setAngleAnimated (float angle, float duration, AnimationType type)
 Method is used to rotate the icon with the specified animation.
 
abstract boolean setBuffer (float width, float height)
 Method is used to specify the buffer size around the icon for collision detection.
 
abstract boolean setOffset (float width, float height)
 Method is used to specify an offset for the circle’s position.
 
abstract boolean setPriority (float priority)
 Method is used to specify the priority of the icon.
 
abstract boolean setFlat (boolean flat)
 Method is used to specify whether the icon is flat or billboarded.
 
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

Represents an icon object on the location view.

Referenced from LocationWindow.

Note
IconMapObject maintains orientation to the screen surface by default.

Definition at line 20 of file IconMapObject.java.

Member Function Documentation

◆ getData()

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

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 ( )
abstractinherited

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 ( )
abstractinherited

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)
abstractinherited

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")

◆ setAngle()

abstract boolean com.navigine.idl.java.IconMapObject.setAngle ( float angle)
abstract

Method is used to specify the rotation angle of the icon.

Parameters
angleRotation angle in degrees. Default: 0.
Returns
true if the operation is successful, false otherwise.

Java code snippet:

// Set icon rotation angle
boolean angleSuccess = iconMapObject.setAngle(45.0);
System.out.println("Set icon rotation angle to 45 degrees: " + angleSuccess);

Kotlin code snippet:

// Set icon rotation angle
val angleSuccess = iconMapObject!!.setAngle(45.0)
println("Set icon rotation angle to 45 degrees: $angleSuccess")

◆ setAngleAnimated()

abstract boolean com.navigine.idl.java.IconMapObject.setAngleAnimated ( float angle,
float duration,
AnimationType type )
abstract

Method is used to rotate the icon with the specified animation.

Parameters
angleRotation angle in degrees.
durationAnimation duration in seconds.
typeAnimation type AnimationType.
Returns
true if the operation is successful, false otherwise.

Java code snippet:

// Set icon rotation with animation
boolean angleAnimatedSuccess = iconMapObject.setAngleAnimated(90.0, 2.0, AnimationType.SINE);
System.out.println("Set icon rotation with animation to 90 degrees: " + angleAnimatedSuccess);

Kotlin code snippet:

// Set icon rotation with animation
val angleAnimatedSuccess = iconMapObject!!.setAngleAnimated(90.0, 2.0, AnimationType.SINE)
println("Set icon rotation with animation to 90 degrees: $angleAnimatedSuccess")

◆ setBitmap()

abstract boolean com.navigine.idl.java.IconMapObject.setBitmap ( android.graphics.Bitmap bitmap)
abstract

Method is used to specify the bitmap image for the icon.

Parameters
bitmapPlatform bitmap object.
Returns
true if the operation is successful, false otherwise.

Java code snippet:

// Set icon bitmap
boolean bitmapSuccess = iconMapObject.setBitmap("path/to/bitmap.png");
System.out.println("Set icon bitmap: " + bitmapSuccess);

Kotlin code snippet:

// Set icon bitmap
val bitmapSuccess = iconMapObject!!.setBitmap("path/to/bitmap.png")
println("Set icon bitmap: $bitmapSuccess")

◆ setBuffer()

abstract boolean com.navigine.idl.java.IconMapObject.setBuffer ( float width,
float height )
abstract

Method is used to specify the buffer size around the icon for collision detection.

Parameters
widthWidth of the buffer in pixels. Default: 0.
heightHeight of the buffer in pixels. Default: 0.
Returns
true if the operation is successful, false otherwise.

Java code snippet:

// Set collision buffer
boolean bufferSuccess = iconMapObject.setBuffer(10.0, 10.0);
System.out.println("Set collision buffer to 10x10 pixels: " + bufferSuccess);

Kotlin code snippet:

// Set collision buffer
val bufferSuccess = iconMapObject!!.setBuffer(10.0, 10.0)
println("Set collision buffer to 10x10 pixels: $bufferSuccess")

◆ setCollisionEnabled()

abstract boolean com.navigine.idl.java.IconMapObject.setCollisionEnabled ( boolean enabled)
abstract

Method is used to enable or disable collision detection for the icon.

Parameters
enabledSpecifies whether collision detection is enabled (true) or disabled (false). Default: false.
Returns
true if the operation is successful, false otherwise.

Java code snippet:

// Enable collision detection
boolean collisionSuccess = iconMapObject.setCollisionEnabled(true);
System.out.println("Enabled collision detection for icon: " + collisionSuccess);

Kotlin code snippet:

// Enable collision detection
val collisionSuccess = iconMapObject!!.setCollisionEnabled(true)
println("Enabled collision detection for icon: $collisionSuccess")

◆ setData()

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

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")

◆ setFlat()

abstract boolean com.navigine.idl.java.IconMapObject.setFlat ( boolean flat)
abstract

Method is used to specify whether the icon is flat or billboarded.

Parameters
flatIf true, the icon aligns with the location view surface; if false, it maintains orientation to the screen surface. Default: false.
Returns
true if the operation is successful, false otherwise.

Java code snippet:

// Set icon flat mode
boolean flatSuccess = iconMapObject.setFlat(true);
System.out.println("Set icon flat mode to true: " + flatSuccess);

Kotlin code snippet:

// Set icon flat mode
val flatSuccess = iconMapObject!!.setFlat(true)
println("Set icon flat mode to true: $flatSuccess")

◆ setInteractive()

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

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")

◆ setOffset()

abstract boolean com.navigine.idl.java.IconMapObject.setOffset ( float width,
float height )
abstract

Method is used to specify an offset for the circle’s position.

Parameters
widthHorizontal offset in pixels.
heightVertical offset in pixels.
Returns
true if the operation is successful, false otherwise.

Java code snippet:

// Set position offset
boolean offsetSuccess = iconMapObject.setOffset(0.0, -16.0);
System.out.println("Set position offset to (0.0, -16.0) pixels: " + offsetSuccess);

Kotlin code snippet:

// Set position offset
val offsetSuccess = iconMapObject!!.setOffset(0.0, -16.0)
println("Set position offset to (0.0, -16.0) pixels: $offsetSuccess")

◆ setPosition()

abstract boolean com.navigine.idl.java.IconMapObject.setPosition ( LocationPoint point)
abstract

Method is used to specify the center of the icon.

Parameters
pointMetrics coordinates of the center LocationPoint.
Returns
true if the operation is successful, false otherwise.

Java code snippet:

// Set icon position
LocationPoint iconPoint = new LocationPoint(200.0, 300.0);
boolean success = iconMapObject.setPosition(iconPoint);
System.out.println("Set icon position to (" + iconPoint.getX() + ", " + iconPoint.getY() + "): " + success);

Kotlin code snippet:

// Set icon position
val position = LocationPoint(30.0, 40.0)
val success = iconMapObject!!.setPosition(position)
println("Set icon position to (${position.x}, ${position.y}): $success")

◆ setPositionAnimated()

abstract boolean com.navigine.idl.java.IconMapObject.setPositionAnimated ( LocationPoint point,
float duration,
AnimationType type )
abstract

Method is used to move the center of the icon with the specified animation.

Parameters
pointMetrics coordinates of the center LocationPoint.
durationAnimation duration in seconds.
typeAnimation type AnimationType.
Returns
true if the operation is successful, false otherwise.

Java code snippet:

// Set icon position with animation
LocationPoint animatedIconPoint = new LocationPoint(250.0, 350.0);
boolean animatedSuccess = iconMapObject.setPositionAnimated(animatedIconPoint, 1.5, AnimationType.CUBIC);
System.out.println("Set icon position with animation to (" + animatedIconPoint.getX() + ", " + animatedIconPoint.getY() + "): " + animatedSuccess);

Kotlin code snippet:

// Set icon position with animation
val animatedPosition = LocationPoint(35.0, 45.0)
val animatedSuccess = iconMapObject!!.setPositionAnimated(animatedPosition, 1.5, AnimationType.CUBIC)
println("Set icon position with animation to (${animatedPosition.x}, ${animatedPosition.y}): $animatedSuccess")

◆ setPriority()

abstract boolean com.navigine.idl.java.IconMapObject.setPriority ( float priority)
abstract

Method is used to specify the priority of the icon.

Parameters
priorityThe priority value for rendering or interaction. Default: max.
Returns
true if the operation is successful, false otherwise.

Java code snippet:

// Set rendering priority
boolean prioritySuccess = iconMapObject.setPriority(2);
System.out.println("Set rendering priority to 2: " + prioritySuccess);

Kotlin code snippet:

// Set rendering priority
val prioritySuccess = iconMapObject!!.setPriority(2)
println("Set rendering priority to 2: $prioritySuccess")

◆ setSize()

abstract boolean com.navigine.idl.java.IconMapObject.setSize ( float width,
float height )
abstract

Method is used to specify the size of the icon.

Parameters
widthWidth of the icon in pixels.
heightHeight of the icon in pixels.
Returns
true if the operation is successful, false otherwise.

Java code snippet:

// Set icon size
boolean sizeSuccess = iconMapObject.setSize(32.0, 32.0);
System.out.println("Set icon size to 32x32 pixels: " + sizeSuccess);

Kotlin code snippet:

// Set icon size
val size = Size(32.0, 32.0)
val sizeSuccess = iconMapObject!!.setSize(size)
println("Set icon size to (${size.width}, ${size.height}): $sizeSuccess")

◆ setTitle()

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

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)
abstractinherited

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: