本文整理汇总了Java中com.google.maps.android.clustering.view.ClusterRenderer类的典型用法代码示例。如果您正苦于以下问题:Java ClusterRenderer类的具体用法?Java ClusterRenderer怎么用?Java ClusterRenderer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ClusterRenderer类属于com.google.maps.android.clustering.view包,在下文中一共展示了ClusterRenderer类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setRenderer
import com.google.maps.android.clustering.view.ClusterRenderer; //导入依赖的package包/类
public void setRenderer(ClusterRenderer<T> view) {
mRenderer.setOnClusterClickListener(null);
mRenderer.setOnClusterItemClickListener(null);
mClusterMarkers.clear();
mMarkers.clear();
mRenderer.onRemove();
mRenderer = view;
mRenderer.onAdd();
mRenderer.setOnClusterClickListener(mOnClusterClickListener);
mRenderer.setOnClusterInfoWindowClickListener(mOnClusterInfoWindowClickListener);
mRenderer.setOnClusterItemClickListener(mOnClusterItemClickListener);
mRenderer.setOnClusterItemInfoWindowClickListener(mOnClusterItemInfoWindowClickListener);
cluster();
}
示例2: setUpClusterer
import com.google.maps.android.clustering.view.ClusterRenderer; //导入依赖的package包/类
private void setUpClusterer() {
GoogleMap map = mapView.getMap();
// Initialize the manager with the context and the map.
clusterManager = new ClusterManager<>(getActivity(), map);
ClusterRenderer<TruckCluster> renderer = new TruckClusterRenderer<>(getActivity(), map, clusterManager);
clusterManager.setRenderer(renderer);
clusterManager.setOnClusterClickListener(this);
clusterManager.setOnClusterItemClickListener(this);
// Point the map's listeners at the listeners implemented by the cluster manager.
map.setOnCameraChangeListener(clusterManager);
map.setOnMarkerClickListener(clusterManager);
}
示例3: getRenderer
import com.google.maps.android.clustering.view.ClusterRenderer; //导入依赖的package包/类
public ClusterRenderer<T> getRenderer() {
return mRenderer;
}