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 6657417
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:45:55+00:00 2026-05-26T01:45:55+00:00

I have activity which can show overlay. This overlay have markers which gets from

  • 0

I have activity which can show overlay. This overlay have markers which gets from web.

How can I implements lazy loading from URL for this markers?

Thx, Igor

  • 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-26T01:45:55+00:00Added an answer on May 26, 2026 at 1:45 am

    What you need to do is get create an AsyncTask to retrieve your data. Once the async task executes and you have the data the UI thread will call onPostExecute(). In your onPostExecute() method you will add your data to your map view the same you would in the example android code.

    Here’s the a mostly complete example. You should be able to fill in the holes with this.

        public class SomeActivity extends MapActivity {
            private MapView mYourMapView;
    
            protected void onCreate(Bundle yourbundle){
              super.onCreate(yourbundle);
              setContentView(R.layout.yourcontentview);
    
              mYourMapView = (MapView)findViewById(R.id.yourmapviewid);
    
              GetYourDataTask task = new GetYourDataTask(mYourMapView);
              task.execute();
            }
         }
    
         public class GetYourDataTask extends AsyncTask<Void, Void, Void>{
               private MapView mView;
               private List<Items> mYourItemsFromInternetSource;
    
               public GetYourDataTask(MapView view){
                  this.mView = view;
               }
    
               protected Void doInBackground(Void... params){
                    .....get some data from internets
                    mYourItemsfromInternetSoruce = something you got from internet;
                    return null;
               }
    
               protected Void onPostExecute(){
                    YourOverlay overlay = new YourOverlay(mYourItemsFromInterSource);
                    mView.getOverlays().add(overlay);
               }
        }
    
        public YourOverlay extends ItemizedOverlay<OverlayItem>{
                  private List<OverlayItem> mItems;
                  public YourOverlay(List<Item> itemsFromInternet)[
                         super(boundCenterBottom(someContext.getResources().getDrawable(R.drawable.map_pin)));
                         //for your items create overlay items then
                         List<OverlayItem> createdItems = someConvertFunction(itemsFromInternet);
                         for(OverlayItem item: createdItems){
                              mItems.add(item);
                              populate();
                         }
                   }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From the examples this looked straightforward. Maybe you can show me what I did
Is there a way to start an activity from a view? I have this
I have created sample application which can call show all contacts (phone numbers). But
I have an activity which checks username availability via .net web services, I need
I have an activity which shows some List entries. When I click on a
I have created an activity which sends a number of notifications to status bar.
I have a couple of tables which are used to log user activity for
Say if I have a locationManager(LM) object in activity A, which is my main
I am trying to prevent the activity from loading twice if I press the
I have generic async task class which fetches response from server . And i

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.