hey guys i want to add more than 300 overlay items through threading n i could not find a way to do that.. means whenever i try to create more than 50 threads (Threads task is to just add overlay item n populate) i get an exception arrayindex out of bounds....
can any1 help me out with this...
my addoverlay method follow
public void addOverlay(OverlayItem overlay, int i )
{
mOverlays.add(overlay);
populate();
}
and thread cotains following code
class showLocationSet implements Runnable
{
private MapOverlay itemizedOverlay;
private int ctr = 0;
showLocationSet(MapOverlay ItemizedOverlay, int Ctr )
{
itemizedOverlay = ItemizedOverlay;
ctr = Ctr ;
}
public void run()
{
Log.i("itemoverlay" , "" + ctr);
itemizedOverlay.addOverlay(itemizedOverlayArr[ctr], ctr);
}
}
this thread is called 50 times ... i wanna call it 300 times thats it ...
bt arrayindex out of bound!!!!!!!!


