I am new to Android and working through a tutorial on the developer site . I am getting stuck at the first Hurdle as it states HeatmapTileProvider cannot be resolved. The code is below:
mProvider = new HeatmapTileProvider.Builder()
.data(list)
.build();
// Add a tile overlay to the map, using the heat map tile provider.
mOverlay = mMap.addTileOverlay(new TileOverlayOptions().tileProvider(mProvider));
Following the error, I have tried importing HeatmapTileProvider into the project. The relevant imports:
import com.google.android.gms.maps.model.TileOverlayOptions;
import com.google.maps.android.heatmaps.HeatmapTileProvider;
I can import the TileOverlayOptions without any problems but HeatmapTileProvider is just greyed and says it cannot resolve Maps. I have tried different variations like:
import com.google.android.gms.maps.heatmaps.HeatmapTileProvider;
Do I need to import something else to enable the HeatmapTileProvider to work? It doesn't indicate this in the tutorial.