Package net.pl3x.map.core.markers.marker
Class Polygon
- All Implemented Interfaces:
JsonSerializable
Represents a polygon marker.
A polygon requires at least one Polyline
for the
outer polygon shape. Any additional polylines will be used
to cut out "holes" in the outer polygon shape.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddPolyline
(Collection<Polyline> polylines) Add polylines to this polygon.addPolyline
(Polyline polyline) Add a polyline to this polygon.addPolyline
(Polyline... polylines) Add polylines to this polygon.Clear the list of polylines in this polygon.boolean
static Polygon
fromJson
(com.google.gson.JsonObject obj) Get the list of polylines in this polygon.int
hashCode()
static Polygon
of
(String key, Collection<Polyline> polylines) Create a new polygon.static Polygon
Create a new polygon.static Polygon
Create a new polygon.removeLine
(Collection<Polyline> polylines) Remove polylines from this polygon.removeLine
(Polyline polyline) Remove a polyline from this polygon.removeLine
(Polyline... polylines) Remove polylines from this polygon.com.google.gson.JsonObject
toJson()
Jsonify this object.toString()
Methods inherited from class net.pl3x.map.core.markers.marker.Marker
circle, circle, ellipse, ellipse, ellipse, ellipse, ellipse, ellipse, ellipse, ellipse, getOptions, getPane, getType, icon, icon, icon, icon, icon, icon, icon, multiPolygon, multiPolygon, multiPolygon, multiPolyline, multiPolyline, multiPolyline, polygon, polygon, polygon, polyline, polyline, polyline, rectangle, rectangle, setOptions, setOptions, setPane
-
Constructor Details
-
Polygon
Create a new polygon.- Parameters:
key
- identifying keypolyline
- polyline to add
-
Polygon
Create a new polygon.- Parameters:
key
- identifying keypolylines
- polylines to add
-
Polygon
Create a new polygon.- Parameters:
key
- identifying keypolylines
- polylines to add
-
-
Method Details
-
of
Create a new polygon.- Parameters:
key
- identifying keypolyline
- polyline to add- Returns:
- a new polygon
-
of
Create a new polygon.- Parameters:
key
- identifying keypolylines
- polylines to add- Returns:
- a new polygon
-
of
Create a new polygon.- Parameters:
key
- identifying keypolylines
- polylines to add- Returns:
- a new polygon
-
getPolylines
Get the list of polylines in this polygon.- Returns:
- list of polylines
-
clearPolylines
Clear the list of polylines in this polygon.- Returns:
- this polygon
-
addPolyline
Add a polyline to this polygon.- Parameters:
polyline
- polyline to remove- Returns:
- this polygon
-
addPolyline
Add polylines to this polygon.- Parameters:
polylines
- polylines to remove- Returns:
- this polygon
-
addPolyline
Add polylines to this polygon.- Parameters:
polylines
- polylines to remove- Returns:
- this polygon
-
removeLine
Remove a polyline from this polygon.- Parameters:
polyline
- polyline to remove- Returns:
- this polygon
-
removeLine
Remove polylines from this polygon.- Parameters:
polylines
- polylines to remove- Returns:
- this polygon
-
removeLine
Remove polylines from this polygon.- Parameters:
polylines
- polylines to remove- Returns:
- this polygon
-
toJson
public com.google.gson.JsonObject toJson()Description copied from interface:JsonSerializable
Jsonify this object.- Returns:
- object as json element
-
fromJson
-
equals
-
hashCode
public int hashCode() -
toString
-