Back to project page SmartNavi.
The source code is released under:
Apache License
If you think the Android project SmartNavi listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.osmdroid.bonuspack.clustering; //w w w . j av a2 s . c o m import java.util.ArrayList; import org.osmdroid.bonuspack.overlays.Marker; import org.osmdroid.util.GeoPoint; /** * Cluster of Markers. * @author M.Kergall */ public class StaticCluster { protected final ArrayList<Marker> mItems = new ArrayList<Marker>(); protected GeoPoint mCenter; protected Marker mMarker; public StaticCluster(GeoPoint center) { mCenter = center; } public void setPosition(GeoPoint center){ mCenter = center; } public GeoPoint getPosition() { return mCenter; } public int getSize() { return mItems.size(); } public Marker getItem(int index) { return mItems.get(index); } public boolean add(Marker t) { return mItems.add(t); } /** set the Marker to be displayed for this cluster */ public void setMarker(Marker marker){ mMarker = marker; } /** @return the Marker to be displayed for this cluster */ public Marker getMarker(){ return mMarker; } }