Wt  3.4.0
Public Member Functions | List of all members
Wt::WLeafletMap::WidgetMarker Class Reference

A marker rendered with a widget. More...

Inheritance diagram for Wt::WLeafletMap::WidgetMarker:
Inheritance graph
[legend]

Public Member Functions

 WidgetMarker (const Coordinate &pos, WWidget *widget)
 Create a new WidgetMarker at the given position with the given widget. More...
 
WWidgetwidget ()
 Get the widget.
 
const WWidgetwidget () const
 Get the widget (const)
 
void setAnchorPoint (double x, double y)
 Set the anchor point of the marker. More...
 
- Public Member Functions inherited from Wt::WLeafletMap::Marker
void move (const Coordinate &pos)
 Move the marker. More...
 
Coordinate position () const
 Get the current position. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ WidgetMarker()

Wt::WLeafletMap::WidgetMarker::WidgetMarker ( const Coordinate pos,
WWidget widget 
)
explicit

Create a new WidgetMarker at the given position with the given widget.

The marker will take ownership of the widget.

Member Function Documentation

◆ setAnchorPoint()

void Wt::WLeafletMap::WidgetMarker::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).


Generated on Wed Jul 31 2019 for the C++ Web Toolkit (Wt) by doxygen 1.8.13