Create a tooltip property

use_tooltip(html, style, ...)

Arguments

html

The innerHTML of the element.

style

A cssText string that will modefiy the default style of the element.

...

not used

Tooltip template Syntax

The tooltip string is a mustache template in which variable names are identified by the double curly brackets (mustache tags) that surround them. The variable names available to the template are given by deck.gl’s pickingInfo.object and vary by layer.

See also

mustache for a complete syntax overwiew.

Examples

data("bart_segments")

props <- list(
  tooltip = use_tooltip(
    html = "{{from_name}} to {{to_name}}",
    style = "background: steelBlue; border-radius: 5px;"
  )
)

# The picking object of the hexagon layer offers
# a property that contains the list of points of the hexagon.
# You can iterate over this list as shown below.
data("sf_bike_parking")

html = "
  <p>{{position.0}}, {{position.1}}<p>
  <p>Count: {{points.length}}</p>
  <p>{{#points}}<div>{{address}}</div>{{/points}}</p>
"