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

Represents a polygon object on the location view. More...

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

Public Member Functions

abstract boolean setPolygon (LocationPolygon polygon)
 Method is used to specify the source polygon of the object.
 
abstract boolean setColor (int color)
 Method is used to specify the color of the object.
 
abstract boolean setOrder (int order)
 Method is used to specify the rendering order of the object.
 
abstract boolean setOutlineColor (int color)
 Method is used to specify the color of the polygon’s outline.
 
abstract boolean setOutlineWidth (float width)
 Method is used to specify the width of the polygon’s outline.
 
abstract boolean setOutlineAlpha (float alpha)
 Method is used to specify the opacity of the polygon’s outline.
 
abstract boolean setOutlineOrder (int order)
 Method is used to specify the rendering order of the polygon’s outline.
 
abstract boolean isValid ()
 
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 setTitleWithStyle (String title, TitleStyle style)
 Method is used to set the title and its style for the map object.
 
abstract boolean setAlpha (float alpha)
 Method is used to set the opacity of the map object.
 

Detailed Description

Represents a polygon object on the location view.

Referenced from LocationWindow.

Definition at line 16 of file PolygonMapObject.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")

Reimplemented in com.navigine.idl.java.internal.CircleMapObjectBinding, com.navigine.idl.java.internal.ClusterMapObjectBinding, com.navigine.idl.java.internal.DottedPolylineMapObjectBinding, com.navigine.idl.java.internal.IconMapObjectBinding, com.navigine.idl.java.internal.MapObjectBinding, com.navigine.idl.java.internal.ModelMapObjectBinding, com.navigine.idl.java.internal.PolygonMapObjectBinding, and com.navigine.idl.java.internal.PolylineMapObjectBinding.

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

Reimplemented in com.navigine.idl.java.internal.CircleMapObjectBinding, com.navigine.idl.java.internal.ClusterMapObjectBinding, com.navigine.idl.java.internal.DottedPolylineMapObjectBinding, com.navigine.idl.java.internal.IconMapObjectBinding, com.navigine.idl.java.internal.MapObjectBinding, com.navigine.idl.java.internal.ModelMapObjectBinding, com.navigine.idl.java.internal.PolygonMapObjectBinding, and com.navigine.idl.java.internal.PolylineMapObjectBinding.

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

Reimplemented in com.navigine.idl.java.internal.CircleMapObjectBinding, com.navigine.idl.java.internal.ClusterMapObjectBinding, com.navigine.idl.java.internal.DottedPolylineMapObjectBinding, com.navigine.idl.java.internal.IconMapObjectBinding, com.navigine.idl.java.internal.MapObjectBinding, com.navigine.idl.java.internal.ModelMapObjectBinding, com.navigine.idl.java.internal.PolygonMapObjectBinding, and com.navigine.idl.java.internal.PolylineMapObjectBinding.

◆ isValid()

abstract boolean com.navigine.idl.java.PolygonMapObject.isValid ( )
abstract

Tells if this PolygonMapObject is valid or not. Any other method (except for this one) called on an invalid PolygonMapObject will throw java.lang.RuntimeException.

Reimplemented from com.navigine.idl.java.MapObject.

Reimplemented in com.navigine.idl.java.internal.PolygonMapObjectBinding.

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

Reimplemented in com.navigine.idl.java.internal.CircleMapObjectBinding, com.navigine.idl.java.internal.ClusterMapObjectBinding, com.navigine.idl.java.internal.DottedPolylineMapObjectBinding, com.navigine.idl.java.internal.IconMapObjectBinding, com.navigine.idl.java.internal.MapObjectBinding, com.navigine.idl.java.internal.ModelMapObjectBinding, com.navigine.idl.java.internal.PolygonMapObjectBinding, and com.navigine.idl.java.internal.PolylineMapObjectBinding.

◆ setColor()

abstract boolean com.navigine.idl.java.PolygonMapObject.setColor ( int color)
abstract

Method is used to specify the color of the object.

Parameters
colorFill color.
Returns
true if success, false otherwise.

Java code snippet:

// Set polygon color
boolean colorSuccess = polygonMapObject.setColor(0xB300FF00);
System.out.println("Set polygon color to green with 70% opacity: " + colorSuccess);

Kotlin code snippet:

// Set polygon color
val colorSuccess = polygonMapObject!!.setColor(0xB300FF00.toInt())
println("Set polygon color to green with 70% opacity: $colorSuccess")

Reimplemented in com.navigine.idl.java.internal.PolygonMapObjectBinding.

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

Reimplemented in com.navigine.idl.java.internal.CircleMapObjectBinding, com.navigine.idl.java.internal.ClusterMapObjectBinding, com.navigine.idl.java.internal.DottedPolylineMapObjectBinding, com.navigine.idl.java.internal.IconMapObjectBinding, com.navigine.idl.java.internal.MapObjectBinding, com.navigine.idl.java.internal.ModelMapObjectBinding, com.navigine.idl.java.internal.PolygonMapObjectBinding, and com.navigine.idl.java.internal.PolylineMapObjectBinding.

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

Reimplemented in com.navigine.idl.java.internal.CircleMapObjectBinding, com.navigine.idl.java.internal.ClusterMapObjectBinding, com.navigine.idl.java.internal.DottedPolylineMapObjectBinding, com.navigine.idl.java.internal.IconMapObjectBinding, com.navigine.idl.java.internal.MapObjectBinding, com.navigine.idl.java.internal.ModelMapObjectBinding, com.navigine.idl.java.internal.PolygonMapObjectBinding, and com.navigine.idl.java.internal.PolylineMapObjectBinding.

◆ setOrder()

abstract boolean com.navigine.idl.java.PolygonMapObject.setOrder ( int order)
abstract

Method is used to specify the rendering order of the object.

Parameters
orderThe rendering order value. Default: 0.
Returns
true if success, false otherwise.

Java code snippet:

// Set polygon rendering order
boolean orderSuccess = polygonMapObject.setOrder(2);
System.out.println("Set polygon rendering order to 2: " + orderSuccess);

Kotlin code snippet:

// Set polygon rendering order
val orderSuccess = polygonMapObject!!.setOrder(2)
println("Set polygon rendering order to 2: $orderSuccess")

Reimplemented in com.navigine.idl.java.internal.PolygonMapObjectBinding.

◆ setOutlineAlpha()

abstract boolean com.navigine.idl.java.PolygonMapObject.setOutlineAlpha ( float alpha)
abstract

Method is used to specify the opacity of the polygon’s outline.

Parameters
alphaOpacity multiplier (0 to 1). Values below 0 are set to 0. Default: 1.
Returns
true if the operation is successful, false otherwise.

Java code snippet:

// Set polygon outline alpha
boolean outlineAlphaSuccess = polygonMapObject.setOutlineAlpha(0.8);
System.out.println("Set polygon outline alpha to 0.8: " + outlineAlphaSuccess);

Kotlin code snippet:

// Set polygon outline alpha
val outlineAlphaSuccess = polygonMapObject!!.setOutlineAlpha(0.8)
println("Set polygon outline alpha to 0.8: $outlineAlphaSuccess")

Reimplemented in com.navigine.idl.java.internal.PolygonMapObjectBinding.

◆ setOutlineColor()

abstract boolean com.navigine.idl.java.PolygonMapObject.setOutlineColor ( int color)
abstract

Method is used to specify the color of the polygon’s outline.

Parameters
colorOutline color.
Returns
true if the operation is successful, false otherwise.

Java code snippet:

// Set polygon outline color
boolean outlineColorSuccess = polygonMapObject.setOutlineColor(0xFF0000FF);
System.out.println("Set polygon outline color to blue: " + outlineColorSuccess);

Kotlin code snippet:

// Set polygon outline color
val outlineColorSuccess = polygonMapObject!!.setOutlineColor(0xFF0000FF.toInt())
println("Set polygon outline color to blue: $outlineColorSuccess")

Reimplemented in com.navigine.idl.java.internal.PolygonMapObjectBinding.

◆ setOutlineOrder()

abstract boolean com.navigine.idl.java.PolygonMapObject.setOutlineOrder ( int order)
abstract

Method is used to specify the rendering order of the polygon’s outline.

Parameters
orderThe rendering order value. Default: 0.
Returns
true if the operation is successful, false otherwise.

Java code snippet:

// Set polygon outline order
boolean outlineOrderSuccess = polygonMapObject.setOutlineOrder(1);
System.out.println("Set polygon outline order to 1: " + outlineOrderSuccess);

Kotlin code snippet:

// Set polygon outline order
val outlineOrderSuccess = polygonMapObject!!.setOutlineOrder(1)
println("Set polygon outline order to 1: $outlineOrderSuccess")

Reimplemented in com.navigine.idl.java.internal.PolygonMapObjectBinding.

◆ setOutlineWidth()

abstract boolean com.navigine.idl.java.PolygonMapObject.setOutlineWidth ( float width)
abstract

Method is used to specify the width of the polygon’s outline.

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

Java code snippet:

// Set polygon outline width
boolean outlineWidthSuccess = polygonMapObject.setOutlineWidth(2.0);
System.out.println("Set polygon outline width to 2.0 pixels: " + outlineWidthSuccess);

Kotlin code snippet:

// Set polygon outline width
val outlineWidthSuccess = polygonMapObject!!.setOutlineWidth(2.0)
println("Set polygon outline width to 2.0 pixels: $outlineWidthSuccess")

Reimplemented in com.navigine.idl.java.internal.PolygonMapObjectBinding.

◆ setPolygon()

abstract boolean com.navigine.idl.java.PolygonMapObject.setPolygon ( LocationPolygon polygon)
abstract

Method is used to specify the source polygon of the object.

Parameters
polygonMetrics coordinates of the polygon LocationPolygon.
Returns
true if success, false otherwise.

Java code snippet:

// Set polygon geometry
List<GlobalPoint> points = Arrays.asList(
new GlobalPoint(100.0, 200.0),
new GlobalPoint(150.0, 250.0),
new GlobalPoint(200.0, 200.0),
new GlobalPoint(150.0, 150.0)
);
LocationPolygon polygon = new LocationPolygon(points, 0);
boolean success = polygonMapObject.setPolygon(polygon);
System.out.println("Set polygon with " + points.size() + " points: " + success);

Kotlin code snippet:

// Set polygon geometry
val points = listOf(
Point(50.0, 60.0),
Point(55.0, 65.0),
Point(60.0, 60.0),
Point(55.0, 55.0)
)
val polygon = LocationPolygon(points, 0)
val success = polygonMapObject!!.setPolygon(polygon)
println("Set polygon with ${points.size} points: $success")

Reimplemented in com.navigine.idl.java.internal.PolygonMapObjectBinding.

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

Reimplemented in com.navigine.idl.java.internal.CircleMapObjectBinding, com.navigine.idl.java.internal.ClusterMapObjectBinding, com.navigine.idl.java.internal.DottedPolylineMapObjectBinding, com.navigine.idl.java.internal.IconMapObjectBinding, com.navigine.idl.java.internal.MapObjectBinding, com.navigine.idl.java.internal.ModelMapObjectBinding, com.navigine.idl.java.internal.PolygonMapObjectBinding, and com.navigine.idl.java.internal.PolylineMapObjectBinding.

◆ setTitleWithStyle()

abstract boolean com.navigine.idl.java.MapObject.setTitleWithStyle ( String title,
TitleStyle style )
abstractinherited

Method is used to set the title and its style for the map object.

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

Java code snippet:

// Set title with style
boolean titleStyleSuccess = circleMapObject.setTitleWithStyle("Styled Circle", titleStyle);
System.out.println("Set circle title with style: " + titleStyleSuccess);

Kotlin code snippet:

// Set title with style
val titleStyleSuccess = circleMapObject!!.setTitleWithStyle("Styled Circle", titleStyle)
println("Set circle title with style: $titleStyleSuccess")

Reimplemented in com.navigine.idl.java.internal.CircleMapObjectBinding, com.navigine.idl.java.internal.ClusterMapObjectBinding, com.navigine.idl.java.internal.DottedPolylineMapObjectBinding, com.navigine.idl.java.internal.IconMapObjectBinding, com.navigine.idl.java.internal.MapObjectBinding, com.navigine.idl.java.internal.ModelMapObjectBinding, com.navigine.idl.java.internal.PolygonMapObjectBinding, and com.navigine.idl.java.internal.PolylineMapObjectBinding.

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

Reimplemented in com.navigine.idl.java.internal.CircleMapObjectBinding, com.navigine.idl.java.internal.ClusterMapObjectBinding, com.navigine.idl.java.internal.DottedPolylineMapObjectBinding, com.navigine.idl.java.internal.IconMapObjectBinding, com.navigine.idl.java.internal.MapObjectBinding, com.navigine.idl.java.internal.ModelMapObjectBinding, com.navigine.idl.java.internal.PolygonMapObjectBinding, and com.navigine.idl.java.internal.PolylineMapObjectBinding.


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