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

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

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

Public Member Functions

abstract boolean setPolyLine (LocationPolyline polyline)
 Method is used to specify the source polyline of the object.
 
abstract boolean setWidth (float width)
 Method is used to specify the width of the polyline.
 
abstract boolean setColor (float red, float green, float blue, float alpha)
 Method is used to specify the fill color of the polyline.
 
abstract boolean setOrder (int order)
 Method is used to specify the rendering order of the polyline.
 
abstract boolean setCapType (CapType cap)
 Method is used to specify the cap style for the polyline ends.
 
abstract boolean setJoinType (JoinType join)
 Method is used to specify the join style for polyline segments.
 
abstract boolean setMiterLimit (float miterLimit)
 Method is used to specify the miter limit for miter joins.
 
abstract boolean setOutlineColor (float red, float green, float blue, float alpha)
 Method is used to specify the color of the polyline’s outline.
 
abstract boolean setOutlineWidth (float radius)
 Method is used to specify the width of the polyline’s outline.
 
abstract boolean setOutlineAlpha (float alpha)
 Method is used to specify the opacity of the polyline’s outline.
 
abstract boolean setOutlineCapType (CapType cap)
 Method is used to specify the cap style for the polyline’s outline ends.
 
abstract boolean setOutlineJoinType (JoinType join)
 Method is used to specify the join style for the polyline’s outline segments.
 
abstract boolean setOutlineMiterLimit (float miterLimit)
 Method is used to specify the miter limit for the polyline’s outline miter joins.
 
abstract boolean setOutlineOrder (int order)
 Method is used to specify the rendering order of the polyline’s outline.
 
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 a polyline object on the location view.

Referenced from LocationWindow.

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

◆ setCapType()

abstract boolean com.navigine.idl.java.PolylineMapObject.setCapType ( CapType cap)
abstract

Method is used to specify the cap style for the polyline ends.

Parameters
capThe cap type CapType. Default: BUTT.
Returns
true if the operation is successful, false otherwise.

Java code snippet:

// Set cap type
boolean capSuccess = polylineMapObject.setCapType(CapType.ROUND);
System.out.println("Set cap type to ROUND: " + capSuccess);

Kotlin code snippet:

// Set polyline cap type
val capTypeSuccess = polylineMapObject!!.setCapType(CapType.ROUND)
println("Set polyline cap type to ROUND: $capTypeSuccess")

◆ setColor()

abstract boolean com.navigine.idl.java.PolylineMapObject.setColor ( float red,
float green,
float blue,
float alpha )
abstract

Method is used to specify the fill color of the polyline.

Parameters
redRed RGBA component (0 to 1).
greenGreen RGBA component (0 to 1).
blueBlue RGBA component (0 to 1).
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 polyline color
boolean colorSuccess = polylineMapObject.setColor(1.0, 0.5, 0.0, 0.9);
System.out.println("Set polyline color to orange with 90% opacity: " + colorSuccess);

Kotlin code snippet:

// Set polyline color
val colorSuccess = polylineMapObject!!.setColor(0.0, 1.0, 0.0, 0.8)
println("Set polyline color to green with 80% opacity: $colorSuccess")

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

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

◆ setJoinType()

abstract boolean com.navigine.idl.java.PolylineMapObject.setJoinType ( JoinType join)
abstract

Method is used to specify the join style for polyline segments.

Parameters
joinThe join type JoinType. Default: MITER.
Returns
true if the operation is successful, false otherwise.

Java code snippet:

// Set join type
boolean joinSuccess = polylineMapObject.setJoinType(JoinType.ROUND);
System.out.println("Set join type to ROUND: " + joinSuccess);

Kotlin code snippet:

// Set polyline join type
val joinTypeSuccess = polylineMapObject!!.setJoinType(JoinType.ROUND)
println("Set polyline join type to ROUND: $joinTypeSuccess")

◆ setMiterLimit()

abstract boolean com.navigine.idl.java.PolylineMapObject.setMiterLimit ( float miterLimit)
abstract

Method is used to specify the miter limit for miter joins.

Parameters
miterLimitThe miter limit value for miter joins. Default: 3.
Returns
true if the operation is successful, false otherwise.

Java code snippet:

// Set miter limit
boolean miterSuccess = polylineMapObject.setMiterLimit(5.0);
System.out.println("Set miter limit to 5.0: " + miterSuccess);

Kotlin code snippet:

// Set polyline miter limit
val miterLimitSuccess = polylineMapObject!!.setMiterLimit(2.0)
println("Set polyline miter limit to 2.0: $miterLimitSuccess")

◆ setOrder()

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

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

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

Java code snippet:

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

Kotlin code snippet:

// Set polyline rendering order
val orderSuccess = polylineMapObject!!.setOrder(1)
println("Set polyline rendering order to 1: $orderSuccess")

◆ setOutlineAlpha()

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

Method is used to specify the opacity of the polyline’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 polyline outline alpha
boolean outlineAlphaSuccess2 = polylineMapObject.setOutlineAlpha(0.5);
System.out.println("Set polyline outline alpha to 0.5: " + outlineAlphaSuccess2);

Kotlin code snippet:

// Set polyline outline alpha
val outlineAlphaSuccess = polylineMapObject!!.setOutlineAlpha(0.5)
println("Set polyline outline alpha to 0.5: $outlineAlphaSuccess")

◆ setOutlineCapType()

abstract boolean com.navigine.idl.java.PolylineMapObject.setOutlineCapType ( CapType cap)
abstract

Method is used to specify the cap style for the polyline’s outline ends.

Parameters
capThe cap type CapType. Default: BUTT.
Returns
true if the operation is successful, false otherwise.

Java code snippet:

// Set polyline outline cap type
boolean outlineCapTypeSuccess2 = polylineMapObject.setOutlineCapType(CapType.SQUARE);
System.out.println("Set polyline outline cap type to SQUARE: " + outlineCapTypeSuccess2);

Kotlin code snippet:

// Set polyline outline cap type
val outlineCapTypeSuccess = polylineMapObject!!.setOutlineCapType(CapType.SQUARE)
println("Set polyline outline cap type to SQUARE: $outlineCapTypeSuccess")

◆ setOutlineColor()

abstract boolean com.navigine.idl.java.PolylineMapObject.setOutlineColor ( float red,
float green,
float blue,
float alpha )
abstract

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

Parameters
redRed RGBA component (0 to 1).
greenGreen RGBA component (0 to 1).
blueBlue RGBA component (0 to 1).
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 polyline outline color
boolean outlineColorSuccess2 = polylineMapObject.setOutlineColor(0.0, 0.0, 0.0, 1.0);
System.out.println("Set polyline outline color to black: " + outlineColorSuccess2);

Kotlin code snippet:

// Set polyline outline color
val outlineColorSuccess = polylineMapObject!!.setOutlineColor(0.0, 0.0, 0.0, 1.0)
println("Set polyline outline color to black: $outlineColorSuccess")

◆ setOutlineJoinType()

abstract boolean com.navigine.idl.java.PolylineMapObject.setOutlineJoinType ( JoinType join)
abstract

Method is used to specify the join style for the polyline’s outline segments.

Parameters
joinThe join type JoinType. Default: MITER.
Returns
true if the operation is successful, false otherwise.

Java code snippet:

// Set polyline outline join type
boolean outlineJoinTypeSuccess2 = polylineMapObject.setOutlineJoinType(JoinType.MITER);
System.out.println("Set polyline outline join type to MITER: " + outlineJoinTypeSuccess2);

Kotlin code snippet:

// Set polyline outline join type
val outlineJoinTypeSuccess = polylineMapObject!!.setOutlineJoinType(JoinType.MITER)
println("Set polyline outline join type to MITER: $outlineJoinTypeSuccess")

◆ setOutlineMiterLimit()

abstract boolean com.navigine.idl.java.PolylineMapObject.setOutlineMiterLimit ( float miterLimit)
abstract

Method is used to specify the miter limit for the polyline’s outline miter joins.

Parameters
miterLimitThe miter limit value for outline miter joins. Default: 3.
Returns
true if the operation is successful, false otherwise.

Java code snippet:

// Set polyline outline miter limit
boolean outlineMiterLimitSuccess2 = polylineMapObject.setOutlineMiterLimit(3.0);
System.out.println("Set polyline outline miter limit to 3.0: " + outlineMiterLimitSuccess2);

Kotlin code snippet:

// Set polyline outline miter limit
val outlineMiterLimitSuccess = polylineMapObject!!.setOutlineMiterLimit(3.0)
println("Set polyline outline miter limit to 3.0: $outlineMiterLimitSuccess")

◆ setOutlineOrder()

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

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

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

Java code snippet:

// Set polyline outline rendering order
boolean outlineOrderSuccess2 = polylineMapObject.setOutlineOrder(0);
System.out.println("Set polyline outline rendering order to 0: " + outlineOrderSuccess2);

Kotlin code snippet:

// Set polyline outline rendering order
val outlineOrderSuccess = polylineMapObject!!.setOutlineOrder(0)
println("Set polyline outline rendering order to 0: $outlineOrderSuccess")

◆ setOutlineWidth()

abstract boolean com.navigine.idl.java.PolylineMapObject.setOutlineWidth ( float radius)
abstract

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

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

Java code snippet:

// Set polyline outline width
boolean outlineWidthSuccess2 = polylineMapObject.setOutlineWidth(1.0);
System.out.println("Set polyline outline width to 1.0 pixels: " + outlineWidthSuccess2);

Kotlin code snippet:

// Set polyline outline width
val outlineWidthSuccess = polylineMapObject!!.setOutlineWidth(1.0)
println("Set polyline outline width to 1.0 pixels: $outlineWidthSuccess")

◆ setPolyLine()

abstract boolean com.navigine.idl.java.PolylineMapObject.setPolyLine ( LocationPolyline polyline)
abstract

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

Parameters
polylineMetrics coordinates of the polyline LocationPolyline.
Returns
true if the operation is successful, false otherwise.

Java code snippet:

// Set polyline geometry
List<Point> polylinePoints = new ArrayList<>();
polylinePoints.add(new Point(0.0, 0.0));
polylinePoints.add(new Point(50.0, 50.0));
polylinePoints.add(new Point(100.0, 0.0));
polylinePoints.add(new Point(150.0, 50.0));
Polyline polyline = new Polyline(polylinePoints);
LocationPolyline locationPolyline = new LocationPolyline(polyline);
boolean success = polylineMapObject.setPolyLine(locationPolyline);
System.out.println("Set polyline geometry: " + success);

Kotlin code snippet:

// Set polyline geometry
val points = listOf(
LocationPoint(100.0, 110.0),
LocationPoint(105.0, 115.0),
LocationPoint(110.0, 120.0),
LocationPoint(115.0, 125.0)
)
val polyline = LocationPolyline(points)
val success = polylineMapObject!!.setPolyLine(polyline)
println("Set polyline with ${points.size} points: $success")

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

◆ setWidth()

abstract boolean com.navigine.idl.java.PolylineMapObject.setWidth ( float width)
abstract

Method is used to specify the width of the polyline.

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

Java code snippet:

// Set polyline width
boolean widthSuccess = polylineMapObject.setWidth(3.0);
System.out.println("Set polyline width to 3.0 pixels: " + widthSuccess);

Kotlin code snippet:

// Set polyline width
val widthSuccess = polylineMapObject!!.setWidth(3.0)
println("Set polyline width to 3.0 pixels: $widthSuccess")

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