안녕하세요~~도저히 해결이 안돼서 이렇게 올립니다..

맵실행시 마커클릭하고 이것저것 조금만해주면...에러가 납니다...

아무래도 updateOverlayㅇㅔ서 에러가 나는듯해서 이렇게 코드를 첨부하구요

음...에러는  java.lang.ArrayIndexOutOfBoundsException 이렇게 납니다...

어디서나는지 참..;;아...음..나름 클리어랑..그런거 한거같은데 ..고수님들의 조언부탁드립니다.

이러다 죽겠어요 ㅠㅠ

public void updateOverlay(Location aLocation){
        listOfOverlays = mMapView.getOverlays();
        InterestingLocations    overlayItem = null;
        InterestingLocations    overlayItem1 = null;
       
        if(listOfOverlays.size()>0)
        {
            overlayItem = (InterestingLocations) listOfOverlays.get(0);
            overlayItem1 = (InterestingLocations) listOfOverlays.get(1);
        }
        overlayItem.locations.clear();
        overlayItem1.locations.clear();
        listOfOverlays.clear();
       
        mFunPlacesMain.setMyPoint(mMarkerMain, 0);
        mMapView.getOverlays().add(mFunPlacesMain);
        // populate();
        if(mIsStoreSearched==false)
        {
            if(mMapView.getZoomLevel() >= ZOOMLEVEL)
            {
              
                   pre.mMyDB.showCarcenter( aLocation );
                 
                   mFunPlacesOther.setMarker(mMarkerOther, 0);
                mMapView.getOverlays().add(mFunPlacesOther);
              
            }else{
                Toast.makeText(this,"안녕하세요.", Toast.LENGTH_SHORT).show();
            }//else
        }else{

         
               pre.mMyDB.showCarcenter( mStoreID );
            
               mFunPlacesOther.setMarker(mMarkerOther, 0);
            mMapView.getOverlays().add(mFunPlacesOther);
            // populate();
        }
        mMapView.postInvalidate();
    }


위의코드로 마커를 찍는데요....음... 아래는 ItemizedOverlay 를 상속받은 클래스에서 마커add해주는함수요..


public void setMyPoint(Drawable  marker, int flag)
        {
            GeoPoint  pointMyLocation  = new GeoPoint((int)(mMyLocation.getLatitude()*1E6),(int)(mMyLocation.getLongitude()* 1E6));//인천(현재좌표)
            locations.add(new OverlayItem( pointMyLocation , "mypoint", null ));
            populate();
        }
      
        public void setMarker(Drawable  marker, int flag){
            for(int i=0;i<mydb.mMapCarLatitude.size();i++) 
            {
                locations.add(new OverlayItem((new GeoPoint((int)(Double.parseDouble(mydb.mMapCarLatitude.get(i).toString())*1E6),
                                                            (int)(Double.parseDouble(mydb.mMapCarLongitude.get(i).toString())* 1E6))), mydb.mMapCarName.get(i)+"", null ));    
              
            }
            populate();
        }

살려줘요 ♥