Class WLeafletMap.WidgetMarker

  • Enclosing class:

    public static class WLeafletMap.WidgetMarker
    extends WLeafletMap.Marker
    A marker rendered with a widget.

    This can be used to place arbitrary widgets on the map.

    The widgets will stay the same size regardless of the zoom level of the map.

    • Method Detail

      • getWidget

        public WWidget getWidget()
        Get the widget.
      • setAnchorPoint

        public void setAnchorPoint​(double x,
                                   double y)
        Set the anchor point of the marker.

        This determines the "tip" of the marker (relative to its top left corner). The marker will be aligned so that this point is at the marker's geographical location.

        If x is negative, the anchor point is in the horizontal center of the widget. If y is negative, the anchor point is in the vertical center of the widget.

        By default the anchor point is in the middle (horizontal and vertical center).

      • createMarkerJS

        protected void createMarkerJS​(java.lang.StringBuilder ss,
                                      java.lang.StringBuilder postJS)
        Specified by:
        createMarkerJS in class WLeafletMap.Marker