Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6010817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:10:14+00:00 2026-05-23T02:10:14+00:00

please guide what mistake am i doing here? any help would be appreciated. private

  • 0

please guide what mistake am i doing here?
any help would be appreciated.

private void LoopThroughEachATMToDisplayOnMap()
           {


               Drawable drawable = null;

                for (int i = 0; i < atm.getAtmList().size(); i++) {

                    if(breakFlag)
                        break;

                    drawable = getAppropriatePin(i);
                    if(drawable == null) 
                    drawable = getResources().getDrawable(R.drawable.marker);
                    itemizedOverlay = new MyItemizedOverlay(drawable, mapView);

                    ATM a = atm.getAtmList().get(i);
                    if (a != null) {
                        int[] coordinates = getIntCoordinates(a
                                .getCoordinates());
                        if (coordinates != null) {
                            GeoPoint point = new GeoPoint(coordinates[0],
                                    coordinates[1]);
                            OverlayItem overlayItem = new OverlayItem(
                                    point, a.getBankName(), a.getAddress()
                                            + "@@" + a.getPhone() + "@@"
                                            + a.getWebAddress() + "@@"
                                            + a.getCoordinates());
                            itemizedOverlay.addOverlay(overlayItem);
                            System.out
                                    .println("coordinates-------------------------"
                                            + i + " "
                                            + coordinates[0]
                                            + ","
                                            + coordinates[1]);
                        }

                    }
                    if(mapOverlays == null)
                        mapOverlays = mapView.getOverlays();

                    mapOverlays.add(itemizedOverlay);
                }
                System.out.println("atms maps injection complete--------------------------------");

           }    

    06-09 18:41:12.019: ERROR/AndroidRuntime(13973): Uncaught handler: thread main exiting due to uncaught exception
    06-09 18:41:12.149: ERROR/AndroidRuntime(13973): java.util.ConcurrentModificationException
    06-09 18:41:12.149: ERROR/AndroidRuntime(13973):     at java.util.AbstractList$SimpleListIterator.next(AbstractList.java:64)
    06-09 18:41:12.149: ERROR/AndroidRuntime(13973):     at com.google.android.maps.OverlayBundle.draw(OverlayBundle.java:44)
    06-09 18:41:12.149: ERROR/AndroidRuntime(13973):     at com.google.android.maps.MapView.onDraw(MapView.java:494)
    06-09 18:41:12.149: ERROR/AndroidRuntime(13973):     at android.view.View.draw(View.java:6535)
    06-09 18:41:12.149: ERROR/AndroidRuntime(13973):     at android.view.ViewGroup.drawChild(ViewGroup.java:1585)
    06-09 18:41:12.149: ERROR/AndroidRuntime(13973):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1312)
    06-09 18:41:12.149: ERROR/AndroidRuntime(13973):     at android.view.View.draw(View.java:6538)
    06-09 18:41:12.149: ERROR/AndroidRuntime(13973):     at android.view.ViewGroup.drawChild(ViewGroup.java:1585)
    06-09 18:41:12.149: ERROR/AndroidRuntime(13973):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1312)
    06-09 18:41:12.149: ERROR/AndroidRuntime(13973):     at android.view.View.draw(View.java:6538)
    06-09 18:41:12.149: ERROR/AndroidRuntime(13973):     at android.widget.FrameLayout.draw(FrameLayout.java:352)
    06-09 18:41:12.149: ERROR/AndroidRuntime(13973):     at android.view.ViewGroup.drawChild(ViewGroup.java:1585)
    06-09 18:41:12.149: ERROR/AndroidRuntime(13973):     at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1312)
    06-09 18:41:12.149: ERROR/AndroidRuntime(13973):     at android.view.View.draw(View.java:6538)
    06-09 18:41:12.149: ERROR/AndroidRuntime(13973):     at android.widget.FrameLayout.draw(FrameLayout.java:352)
    06-09 18:41:12.149: ERROR/AndroidRuntime(13973):     at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1866)
    06-09 18:41:12.149: ERROR/AndroidRuntime(13973):     at android.view.ViewRoot.draw(ViewRoot.java:1364)
    06-09 18:41:12.149: ERROR/AndroidRuntime(13973):     at android.view.ViewRoot.performTraversals(ViewRoot.java:1118)
    06-09 18:41:12.149: ERROR/AndroidRuntime(13973):     at android.view.ViewRoot.handleMessage(ViewRoot.java:1650)
    06-09 18:41:12.149: ERROR/AndroidRuntime(13973):     at android.os.Handler.dispatchMessage(Handler.java:99)
    06-09 18:41:12.149: ERROR/AndroidRuntime(13973):     at android.os.Looper.loop(Looper.java:123)
    06-09 18:41:12.149: ERROR/AndroidRuntime(13973):     at android.app.ActivityThread.main(ActivityThread.java:4595)
    06-09 18:41:12.149: ERROR/AndroidRuntime(13973):     at java.lang.reflect.Method.invokeNative(Native Method)
    06-09 18:41:12.149: ERROR/AndroidRuntime(13973):     at java.lang.reflect.Method.invoke(Method.java:521)
    06-09 18:41:12.149: ERROR/AndroidRuntime(13973):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
    06-09 18:41:12.149: ERROR/AndroidRuntime(13973):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
    06-09 18:41:12.149: ERROR/AndroidRuntime(13973):     at dalvik.system.NativeStart.main(Native Method)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T02:10:15+00:00Added an answer on May 23, 2026 at 2:10 am

    i got answer my self.

    actually mapOverlays.add(itemizedOverlay); needs ui to run.

    so it was not ui thread thats why it was raising error.

    i just ran that function in uithread and which resolved my problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

can any one guide me what mistake am i doing in this code??? it
I would request you to please help me out and guide me to the
Can any one please guide me to look in depth about the Data Structures
Please can anyone recommend a quick checklist / best practice guide to help us
Please guide and help me. I have a MDI parent form which has a
Please guide me, are there any out of box data structures in C# that
Please guide what is meaning by Web is stateless in simple words ? Kindly
Can some one please guide me to understand which jar file i need to
Can you please guide me what is session and session variables? I don't need
Please recommend some websites with a quick guide. MSDN is good but it's hard

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.