class_docstr: Heatmap with weighted points.
  
  Add this layer to a ``Map`` instance to draw a heatmap. Unlike the plain
  Heatmap layer, which assumes that all points should have equal weight,
  this layer lets you specifiy different weights for points.
  
  You should not instantiate this directly. Instead, use the
  :func:`gmaps.heatmap_layer` factory function, passing in a
  parameter for `weights`.
  
  {locations}
  
  :param weights:
      List of non-negative floats corresponding to the importance of
      each latitude-longitude pair. Must have the same length as
      `locations`.
  :type weights: list of floats
  
  {options}
  
  :param data: DEPRECATED. Use `locations` and `weights` instead.
      List of (latitude, longitude, weight) triples for a single
      point. Latitudes are expressed as a float between -90 (corresponding to
      90 degrees south) and +90 (corresponding to 90 degrees north).
      Longitudes are expressed as a float between -180
      (corresponding to 180 degrees west) and +180 (corresponding to
      180 degrees east). Weights must be non-negative.
  :type data: list of tuples
  
  :Examples:
  
  >>> fig = gmaps.figure()
  >>> locations = [(46.1, 5.2), (46.2, 5.3), (46.3, 5.4)]
  >>> weights = [0.5, 0.2, 0.8]
  >>> heatmap = gmaps.heatmap_layer(locations, weights=weights)
  >>> heatmap.max_intensity = 2
  >>> fig.add_layer(heatmap_layer)
code: def _calc_bounds(self, change):
      data = change["new"]
      self.set_bounds(data)
  
imports: import ipywidgets
  from traitlets import Float, Bool, Unicode, HasTraits, default, List, observe
  from .None import bounds
  from .locations import locations_docstring
  from .None import geotraitlets
  from .maps import GMapsWidgetMixin
  from ._docutils import doc_subst
label_desc: Use image node_id 1 for calling the WeightedHeatmap obj's underlying member method code with example usage: obj._calc_bounds(change) without return types