Class Polyline
- All Implemented Interfaces:
JsonSerializable
This line could be used as a polygon's outer poly, or as inner poly to punch holes into the outer poly.
A minimum of 2 Points are needed to create a valid and
visible line for a polyline on the map.
A minimum of 3 Points are needed to create a valid and
visible line for a polygon on the map.
The last point you add does not need to be the same as the first point you added for a polygon.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull PolylineaddPoint(@NotNull Collection<@NotNull Point> points) Add points to this line.@NotNull PolylineAdd a point to this line.@NotNull PolylineAdd points to this line.@NotNull PolylineClear the list of points in this polyline.booleanstatic @NotNull PolylinefromJson(@NotNull com.google.gson.JsonObject obj) Get the list of points in this polyline.inthashCode()@NotNull Polylineloop()Add the first point as the end point, closing off the shape.static @NotNull Polylineof(@NotNull String key, @NotNull Collection<@NotNull Point> points) Create a new line.static @NotNull PolylineCreate a new line.static @NotNull PolylineCreate a new line.@NotNull PolylineremovePoint(@NotNull Collection<@NotNull Point> points) Remove points from this polyline.@NotNull PolylineremovePoint(@NotNull Point point) Remove a point from this polyline.@NotNull PolylineremovePoint(@NotNull Point @NotNull ... points) Remove points from this polyline.@NotNull com.google.gson.JsonObjecttoJson()Jsonify this object.@NotNull StringtoString()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
-
Polyline
Create a new line.The last point you add does not need to be the same as the first point you added for a polygon.
- Parameters:
key- identifying keypoint- point to add
-
Polyline
Create a new line.The last point you add does not need to be the same as the first point you added for a polygon.
- Parameters:
key- identifying keypoints- points to add
-
Polyline
Create a new line.The last point you add does not need to be the same as the first point you added for a polygon.
- Parameters:
key- identifying keypoints- points to add
-
-
Method Details
-
of
@NotNull public static @NotNull Polyline of(@NotNull @NotNull String key, @NotNull @NotNull Point point) Create a new line.The last point you add does not need to be the same as the first point you added for a polygon.
- Parameters:
key- identifying keypoint- point to add- Returns:
- a new line
-
of
@NotNull public static @NotNull Polyline of(@NotNull @NotNull String key, @NotNull @NotNull Point @NotNull ... points) Create a new line.The last point you add does not need to be the same as the first point you added for a polygon.
- Parameters:
key- identifying keypoints- points to add- Returns:
- a new line
-
of
@NotNull public static @NotNull Polyline of(@NotNull @NotNull String key, @NotNull @NotNull Collection<@NotNull Point> points) Create a new line.The last point you add does not need to be the same as the first point you added for a polygon.
- Parameters:
key- identifying keypoints- points to add- Returns:
- a new line
-
getPoints
Get the list of points in this polyline.- Returns:
- list of points
-
clearPoints
Clear the list of points in this polyline.- Returns:
- this polyline
-
loop
Add the first point as the end point, closing off the shape.The last point you add does not need to be the same as the first point you added for a polygon.
- Returns:
- this line
-
addPoint
Add a point to this line.The last point you add does not need to be the same as the first point you added for a polygon.
- Parameters:
point- point to add- Returns:
- this line
-
addPoint
Add points to this line.The last point you add does not need to be the same as the first point you added for a polygon.
- Parameters:
points- points to add- Returns:
- this line
-
addPoint
Add points to this line.The last point you add does not need to be the same as the first point you added for a polygon.
- Parameters:
points- points to add- Returns:
- this line
-
removePoint
Remove a point from this polyline.- Parameters:
point- point to remove- Returns:
- this polyline
-
removePoint
Remove points from this polyline.- Parameters:
points- points to remove- Returns:
- this polyline
-
removePoint
Remove points from this polyline.- Parameters:
points- points to remove- Returns:
- this polyline
-
toJson
@NotNull public @NotNull com.google.gson.JsonObject toJson()Description copied from interface:JsonSerializableJsonify this object.- Returns:
- object as json element
-
fromJson
-
equals
-
hashCode
public int hashCode() -
toString
-