Skip to content

Commit cc62191

Browse files
committed
Html-Marker
1 parent 92948cf commit cc62191

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

src/main/java/de/bluecolored/bluemap/api/marker/HtmlMarker.java

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,32 @@
3030
public interface HtmlMarker extends Marker, DistanceRangedMarker {
3131

3232
/**
33-
* Getter for the position (in pixels) where the icon is anchored to the map.
33+
* Getter for the position (in pixels) where the html-element is anchored to the map.
3434
* @return the anchor-position in pixels
3535
*/
3636
Vector2i getAnchor();
37-
37+
38+
/**
39+
* Sets the position (in pixels) where the html-element is anchored to the map.
40+
* @param anchor the anchor-position in pixels
41+
*/
42+
void setAnchor(Vector2i anchor);
43+
44+
/**
45+
* Sets the position (in pixels) where the html-element is anchored to the map.
46+
* @param x the anchor-x-position in pixels
47+
* @param y the anchor-y-position in pixels
48+
*/
49+
default void setAnchor(int x, int y) {
50+
setAnchor(new Vector2i(x, y));
51+
}
52+
53+
/**
54+
* Getter for the html-code of this HTML marker
55+
* @return the html-code
56+
*/
57+
String getHtml();
58+
3859
/**
3960
* Sets the html for this {@link HtmlMarker}.
4061
*
@@ -43,7 +64,7 @@ public interface HtmlMarker extends Marker, DistanceRangedMarker {
4364
* Make sure you escape all html-tags from possible user inputs to prevent possible <a href="https://en.wikipedia.org/wiki/Cross-site_scripting">XSS-Attacks</a> on the web-client!
4465
* </p>
4566
*
46-
* @param html the html-element that will be inserted as the marker.
67+
* @param html the html that will be inserted as the marker.
4768
*/
4869
void setHtml(String html);
4970

0 commit comments

Comments
 (0)