Class HeatmapTileProvider.Builder

  • Enclosing class:
    HeatmapTileProvider

    public static class HeatmapTileProvider.Builder
    extends java.lang.Object
    Builder class for the HeatmapTileProvider.
    • Constructor Detail

      • Builder

        public Builder()
        Constructor for builder. No required parameters here, but user must call either data() or weightedData().
    • Method Detail

      • data

        public HeatmapTileProvider.Builder data​(java.util.Collection<com.google.android.gms.maps.model.LatLng> val)
        Setter for data in builder. Must call this or weightedData
        Parameters:
        val - Collection of LatLngs to put into quadtree. Should be non-empty.
        Returns:
        updated builder object
      • weightedData

        public HeatmapTileProvider.Builder weightedData​(java.util.Collection<WeightedLatLng> val)
        Setter for data in builder. Must call this or data
        Parameters:
        val - Collection of WeightedLatLngs to put into quadtree. Should be non-empty.
        Returns:
        updated builder object
      • radius

        public HeatmapTileProvider.Builder radius​(int val)
        Setter for radius in builder
        Parameters:
        val - Radius of convolution to use, in terms of pixels. Must be within minimum and maximum values of 10 to 50 inclusive.
        Returns:
        updated builder object
      • gradient

        public HeatmapTileProvider.Builder gradient​(Gradient val)
        Setter for gradient in builder
        Parameters:
        val - Gradient to color heatmap with.
        Returns:
        updated builder object
      • opacity

        public HeatmapTileProvider.Builder opacity​(double val)
        Setter for opacity in builder
        Parameters:
        val - Opacity of the entire heatmap in range [0, 1]
        Returns:
        updated builder object
      • maxIntensity

        public HeatmapTileProvider.Builder maxIntensity​(double val)
        Setter for Max Intensity in builder
        Parameters:
        val - maximum intensity of pixel density
        Returns:
        updated builder object
      • build

        public HeatmapTileProvider build()
        Call when all desired options have been set. Note: you must set data using data or weightedData before this!
        Returns:
        HeatmapTileProvider created with desired options.