java - How can I set the name of markers inside a cluster manager using a list? -


so have around 850 markers have on map, , have implemented cluster manager successfully, can't seem figure out how can set each marker's title (which have kept in list). have tried below code, of marker's title's set first item in list. thoughts?

jacob

here code i've tried (where universityname list)

mclustermanager.getmarkercollection().setonmarkerclicklistener(new googlemap.onmarkerclicklistener() {                 @override                 public boolean onmarkerclick(marker marker) {                     for(int = 0; < 835; i++) {                         marker.settitle(universityname.get(i));                      }                     return false;                 }             }); 

here myclass:

class myitem implements clusteritem {     private final latlng mposition;       public myitem(double lat, double lng) {         mposition = new latlng(lat, lng);          }      @override     public latlng getposition() {         return mposition;     }   } 


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -