MapTrip SDK Android Manual 9.8.8
Polygon Class Reference

A Polygon that can be used to specify an area 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)
 
native String getAttributeAsString (String attribute)
 
native Iterable< PointgetPoints ()
 
 Polygon ()
 
 Polygon (List< Point > points)
 
ApiError setAttributeAsDouble (final String attribute, final double value)
 
ApiError setAttributeAsInt (final String attribute, final int value)
 
ApiError setAttributeAsString (final String attribute, final String value)
 
native ApiError setPoints (List< Point > points)
 

Detailed Description

Constructor & Destructor Documentation

◆ Polygon() [1/2]

Polygon ( )

Create an empty polygon

◆ Polygon() [2/2]

Polygon ( List< Point points)

Create a polygon with an arbitrary amount of points

Parameters
points- initial points

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

◆ 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

◆ getPoints()

native Iterable< Point > getPoints ( )

Returns
iterator over all points in the polygon

◆ 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

◆ setAttributeAsString()

ApiError setAttributeAsString ( final String  attribute,
final String  value 
)

Sets an attribute

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

◆ setPoints()

native ApiError setPoints ( List< Point points)

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

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