MapTrip SDK Android Manual 9.10.8
 
Loading...
Searching...
No Matches
Polygon Class Reference

A Polygon or Polyline or Point that can be used to specify an area, path or point on the map
More...

+ Inheritance diagram for Polygon:

Public Member Functions

boolean equals (Object o)
 
native double getAttributeAsDouble (String attribute)
 
native int getAttributeAsInt (String attribute)
 
long getAttributeAsInt64 (final String attribute)
 
native String getAttributeAsString (String attribute)
 
long getEndTime ()
 
String getID ()
 
native Iterable< PointgetPoints ()
 
long getStartTime ()
 
 Polygon ()
 
 Polygon (List< Point > points)
 
 Polygon (Point center, double radiusMeters)
 
ApiError setAttributeAsDouble (final String attribute, final double value)
 
ApiError setAttributeAsInt (final String attribute, final int value)
 
ApiError setAttributeAsInt64 (final String attribute, final long value)
 
ApiError setAttributeAsString (final String attribute, final String value)
 
ApiError setEndTime (final long time)
 
ApiError setID (final String id)
 
native ApiError setPoints (List< Point > points)
 
ApiError setStartTime (final long time)
 

Detailed Description

Constructor & Destructor Documentation

◆ Polygon() [1/3]

Polygon ( )

Create an empty polygon

◆ Polygon() [2/3]

Polygon ( List< Point points)

Create a polygon with an arbitrary amount of points

Parameters
points- initial points

◆ Polygon() [3/3]

Polygon ( Point  center,
double  radiusMeters 
)

Create a polygon approximating a circle around a center point. Uses a fixed resolution to approximate the circle on all platforms.

Parameters
center- center of the circle
radiusMeters- radius in meters
Returns
polygon handle representing the circle approximation

Member Function Documentation

◆ equals()

boolean equals ( Object  o)
inherited

◆ getAttributeAsDouble()

native double getAttributeAsDouble ( String  attribute)

Retrieves an attribute as double of the polygon by name. If the attribute is unknown, an empty string will be returned.

Parameters
attribute- Name of the attribute.
Returns
floating point value of the attribute

◆ getAttributeAsInt()

native int getAttributeAsInt ( String  attribute)

Retrieves an attribute as int of the polygon by name. If the attribute is unknown, an empty string will be returned.

Parameters
attribute- Name of the attribute.
Returns
int value of the attribute

◆ getAttributeAsInt64()

long getAttributeAsInt64 ( final String  attribute)

Gets an attribute

Parameters
attribute- Name of the attribute.
value- value of the attribute

◆ getAttributeAsString()

native String getAttributeAsString ( String  attribute)

Retrieves an attribute as string of the polygon by name. If the attribute is unknown, an empty string will be returned.

Parameters
attribute- Name of the attribute to retrieve.
Returns
string value of the attribute

◆ getEndTime()

long getEndTime ( )

Gets the end time for blockage

Parameters
time- the time in utc (seconds since 1970)

◆ getID()

String getID ( )

Gets the ID of this polygon

Parameters
value- The ID of this polygon

◆ getPoints()

native Iterable< Point > getPoints ( )

Returns
iterator over all points in the polygon

◆ getStartTime()

long getStartTime ( )

Gets the start time for blockage

Parameters
time- the time in utc (seconds since 1970)

◆ setAttributeAsDouble()

ApiError setAttributeAsDouble ( final String  attribute,
final double  value 
)

Sets an attribute

Parameters
attribute- Name of the attribute.
value- value of the attribute

◆ setAttributeAsInt()

ApiError setAttributeAsInt ( final String  attribute,
final int  value 
)

Sets an attribute

Parameters
attribute- Name of the attribute.
value- value of the attribute

◆ setAttributeAsInt64()

ApiError setAttributeAsInt64 ( final String  attribute,
final long  value 
)

Sets an attribute

Parameters
attribute- Name of the attribute.
value- value of the attribute

◆ setAttributeAsString()

ApiError setAttributeAsString ( final String  attribute,
final String  value 
)

Sets an attribute

Parameters
attribute- Name of the attribute.
value- value of the attribute

◆ setEndTime()

ApiError setEndTime ( final long  time)

Sets the end time for blockage

Parameters
time- the time in utc (seconds since 1970)

◆ setID()

ApiError setID ( final String  id)

Sets the ID for this polygon

Parameters
id- ID of this polygon

◆ setPoints()

native ApiError setPoints ( List< Point points)

Parameters
points- the points of the polygon to set
Returns
Errorcode

◆ setStartTime()

ApiError setStartTime ( final long  time)

Sets the start time for blockage

Parameters
time- the time in utc (seconds since 1970)

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