Class Marker<T extends Marker<T>>
java.lang.Object
net.pl3x.map.core.Keyed
net.pl3x.map.core.markers.marker.Marker<T>
- All Implemented Interfaces:
JsonSerializable
- Direct Known Subclasses:
Circle, Ellipse, Icon, MultiPolygon, MultiPolyline, Polygon, Polyline, Rectangle
@NullMarked
public abstract class Marker<T extends Marker<T>>
extends Keyed
implements JsonSerializable
Represents a map marker.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CircleCreate a new circle.static CircleCreate a new circle.static EllipseCreate a new ellipse.static EllipseCreate a new ellipse.static EllipseCreate a new ellipse.static EllipseCreate a new ellipse.static EllipseCreate a new ellipse.static EllipseCreate a new ellipse.static EllipseCreate a new ellipse.static EllipseCreate a new ellipse.static Marker<?> fromJson(com.google.gson.JsonObject obj) @Nullable OptionsGet the options of this marker.@Nullable StringgetPane()Get the map pane where the marker will be added.getType()Get the type identifier of this marker.static IconCreate a new icon.static IconCreate a new icon.static IconCreate a new icon.static IconCreate a new icon.static IconCreate a new icon.static IconCreate a new icon.static IconCreate a new icon.static MultiPolygonmultiPolygon(String key, List<Polygon> polygons) Create a new multi-polygon.static MultiPolygonmultiPolygon(String key, Polygon polygon) Create a new multi-polygon.static MultiPolygonmultiPolygon(String key, Polygon... polygons) Create a new multi-polygon.static MultiPolylinemultiPolyline(String key, List<Polyline> polylines) Create a new multi-polyline.static MultiPolylinemultiPolyline(String key, Polyline polyline) Create a new multi-polyline.static MultiPolylinemultiPolyline(String key, Polyline... polylines) Create a new multi-polyline.static PolygonCreate a new polygon.static PolygonCreate a new polygon.static PolygonCreate a new polygon.static PolylineCreate a new polyline.static PolylineCreate a new polyline.static PolylineCreate a new polyline.static RectangleCreate a new rectangle.static RectangleCreate a new rectangle.setOptions(@Nullable Options options) Set new options for this marker.setOptions(@Nullable Options.Builder builder) Set new options for this marker.Set the map pane where the marker will be added.Methods inherited from interface JsonSerializable
toJson
-
Constructor Details
-
Marker
-
-
Method Details
-
circle
-
circle
-
ellipse
-
ellipse
-
ellipse
-
ellipse
-
ellipse
public static Ellipse ellipse(String key, double centerX, double centerZ, double radiusX, double radiusZ, double tilt) Create a new ellipse.- Parameters:
key- identifying keycenterX- center x locationcenterZ- center z locationradiusX- x radiusradiusZ- z radiustilt- tilt- Returns:
- a new ellipse
-
ellipse
-
ellipse
-
ellipse
-
icon
-
icon
-
icon
-
icon
-
icon
-
icon
-
icon
-
multiPolygon
Create a new multi-polygon.- Parameters:
key- identifying keypolygon- polygon to add- Returns:
- a new multi-polygon
-
multiPolygon
Create a new multi-polygon.- Parameters:
key- identifying keypolygons- polygons to add- Returns:
- a new multi-polygon
-
multiPolygon
Create a new multi-polygon.- Parameters:
key- identifying keypolygons- polygons to add- Returns:
- a new multi-polygon
-
multiPolyline
Create a new multi-polyline.- Parameters:
key- identifying keypolyline- polyline to add- Returns:
- a new multi-polyline
-
multiPolyline
Create a new multi-polyline.- Parameters:
key- identifying keypolylines- polylines to add- Returns:
- a new multi-polyline
-
multiPolyline
Create a new multi-polyline.- Parameters:
key- identifying keypolylines- polylines to add- Returns:
- a new multi-polyline
-
polygon
-
polygon
-
polygon
-
polyline
-
polyline
-
polyline
-
rectangle
-
rectangle
-
getType
Get the type identifier of this marker.Used in the serialized json for the frontend.
- Returns:
- marker type
-
getPane
Get the map pane where the marker will be added.Defaults to the overlay pane if null.
- Returns:
- map pane
-
setPane
-
getOptions
Get the options of this marker.Null options represents "default" values. See wiki about defaults.
- Returns:
- marker options
-
setOptions
-
setOptions
Set new options for this marker.Null options represents "default" values. See wiki about defaults.
- Parameters:
builder- new options builder or null- Returns:
- this marker
-
fromJson
-