google-maps-clustering icon indicating copy to clipboard operation
google-maps-clustering copied to clipboard

Zoom after cluster click

Open Marvin99 opened this issue 7 years ago • 2 comments

Hi. I do not understand how to make clustering after click on Cluster? In google library we go that:

@Override public boolean onClusterClick(final Cluster<MyItem> cluster) { map.animateCamera(CameraUpdateFactory.newLatLngZoom( cluster.getPosition(), (float) Math.floor(map .getCameraPosition().zoom + 1)), 300, null); return true;

In this library we do not have getPosition() so how we can do it? Sorry, if this is very stupid question I am a beginner in android.

Marvin99 avatar May 15 '18 10:05 Marvin99

bro. do u know how to add custom markers icon based on tag in this library

basitsaleemmb avatar May 15 '18 10:05 basitsaleemmb

You can do following to move camera on cluster click: map.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(cluster.getLatitude(), cluster.getLongitude()), (float) Math.floor(map .getCameraPosition().zoom + 1)), null);

petermolcany avatar Aug 26 '18 10:08 petermolcany