Package 

Class HeatmapTileProvider

  • All Implemented Interfaces:
    com.google.android.gms.maps.model.TileProvider

    
    public class HeatmapTileProvider
     implements TileProvider
                        

    Tile provider that creates heatmap tiles.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public class HeatmapTileProvider.Builder

      Builder class for the HeatmapTileProvider.

    • Method Summary

      Modifier and Type Method Description
      void setWeightedData(Collection<WeightedLatLng> data) Changes the dataset the heatmap is portraying.
      void setData(Collection<LatLng> data) Changes the dataset the heatmap is portraying.
      Tile getTile(int x, int y, int zoom) Creates tile.
      void setGradient(Gradient gradient) Setter for gradient/color map.User should clear overlay's tile cache (using clearTileCache()) after calling this.
      void setRadius(int radius) Setter for radius.User should clear overlay's tile cache (using clearTileCache()) after calling this.
      void setOpacity(double opacity) Setter for opacityUser should clear overlay's tile cache (using clearTileCache()) after calling this.
      void setMaxIntensity(double intensity) Setter for max intensityUser should clear overlay's tile cache (using clearTileCache()) after calling this.
      • Methods inherited from class com.google.android.gms.maps.model.TileProvider

        getTile
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • setWeightedData

         void setWeightedData(Collection<WeightedLatLng> data)

        Changes the dataset the heatmap is portraying. Weighted.User should clear overlay's tile cache (using clearTileCache()) after calling this.

        Parameters:
        data - Data set of points to use in the heatmap, as LatLngs.Note: Editing data without calling setWeightedData again will not update the datadisplayed on the map, but will impact calculation of max intensity values,as the collection you pass in is stored.Outside of changing the data, max intensity values are calculated only uponchanging the radius.
      • setData

         void setData(Collection<LatLng> data)

        Changes the dataset the heatmap is portraying. Unweighted.User should clear overlay's tile cache (using clearTileCache()) after calling this.

        Parameters:
        data - Data set of points to use in the heatmap, as LatLngs.
      • getTile

         Tile getTile(int x, int y, int zoom)

        Creates tile.

        Parameters:
        x - X coordinate of tile.
        y - Y coordinate of tile.
        zoom - Zoom level.
      • setGradient

         void setGradient(Gradient gradient)

        Setter for gradient/color map.User should clear overlay's tile cache (using clearTileCache()) after calling this.

        Parameters:
        gradient - Gradient to set
      • setRadius

         void setRadius(int radius)

        Setter for radius.User should clear overlay's tile cache (using clearTileCache()) after calling this.

        Parameters:
        radius - Radius to set
      • setOpacity

         void setOpacity(double opacity)

        Setter for opacityUser should clear overlay's tile cache (using clearTileCache()) after calling this.

        Parameters:
        opacity - opacity to set
      • setMaxIntensity

         void setMaxIntensity(double intensity)

        Setter for max intensityUser should clear overlay's tile cache (using clearTileCache()) after calling this.

        Parameters:
        intensity - intensity to set