mAnimHandler.post(new Runnable() { @Override public void run() { marker.setIcon(mSteamFrames.nextFrame()); // Next frame in 32 ms mAnimHandler.postDelayed(this, 32); } });
ColorMatrix desatMatrix = new ColorMatrix(); desatMatrix.setSaturation(restaurantRating); ColorFilter paintColorFilter = new ColorMatrixColorFilter(desatMatrix); Paint paint = new Paint(); paint.setColorFilter(paintColorFilter); Canvas canvas = new Canvas(newImage); canvas.drawBitmap(oldImage, 0, 0, paint);
compile 'com.google.maps.android:android-maps-utils:0.3+'
public interface ClusterItem { LatLng getPosition(); }
mClusterManager = new ClusterManager<>(this, mMap); mMap.setOnCameraChangeListener(mClusterManager); mMap.setOnMarkerClickListener(mClusterManager);
mClusterManager.addItem(clusterItem);
mHeatmapTileProvider = new HeatmapTileProvider.Builder() .data(mLatLngCollection) .build();
mTileOverlay = mMap.addTileOverlay( new TileOverlayOptions().tileProvider(mHeatmapTileProvider));