public class DivPointIcon extends AbstractCustomPointIcon
<div>
element instead of an image.
This type of icon allows you to specify an html code that will be used as an icon.
Modifier | Constructor and Description |
---|---|
protected |
DivPointIcon(java.lang.String html)
Creates an icon that uses the given
<div> element instead of an image. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getIcon() |
java.lang.String |
getStyles() |
DivPointIcon |
setIconAnchor(double x,
double y)
Sets the coordinates of the "tip" of the icon in pixels (relative to its top left corner).
|
DivPointIcon |
setIconSize(double x,
double y)
Does not affect size of the html content.
|
DivPointIcon |
setPopupAnchor(double x,
double y)
Sets the coordinates of the point from which popups will open (relative to the icon anchor).
|
DivPointIcon |
setStyles(java.lang.String styles)
Sets one or more user-defined CSS style names for the
<div> element. |
getIconAnchor, getIconSize, getPopupAnchor
protected DivPointIcon(java.lang.String html)
<div>
element instead of an image.public java.lang.String getIcon()
public java.lang.String getStyles()
public DivPointIcon setStyles(java.lang.String styles)
<div>
element.
Multiple styles can be specified as space-separated list of style names.
Replaces the default style, which is a white square. So, to get rid of the white square, specify any style name
(for example, my-div-style
).
public DivPointIcon setIconAnchor(double x, double y)
AbstractCustomPointIcon
setIconAnchor
in class AbstractCustomPointIcon
public DivPointIcon setIconSize(double x, double y)
iconAnchor
and popupAnchor
options.setIconSize
in class AbstractCustomPointIcon
public DivPointIcon setPopupAnchor(double x, double y)
AbstractCustomPointIcon
setPopupAnchor
in class AbstractCustomPointIcon