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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:01:03+00:00 2026-06-03T04:01:03+00:00

Ok so at the moment I’m getting a null pointer exception when adding to

  • 0

Ok so at the moment I’m getting a null pointer exception when adding to the list of overlays. I’ve declared this at the top of the map activity class:

private static List<Overlay> mOverlays;

And then further down I’ve got this for my source/ from point:

Drawable fromDrawable = getResources().getDrawable(R.drawable.pin_blue);
OverlayItem fromOverlayItem = new OverlayItem(fromGeoPoint, "Hello!", "This is your current Location.");
MapWhatsNearOverlay fromItemizedOverlay = new MapWhatsNearOverlay(fromDrawable);
mOverlays.add(fromItemizedOverlay);

connectAsyncTask _connectAsyncTask = new connectAsyncTask();
_connectAsyncTask.execute();
mMapView.getOverlays().add((Overlay) mOverlays);

And the same for the destination as well, but the null pointer exception pops up when processing the bottom line of code.

  • 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-06-03T04:01:04+00:00Added an answer on June 3, 2026 at 4:01 am

    Refer this link to draw driving path in your application. You just need to add the four classes present in the link in your project and call the below lines when you need to display the route.

    SharedData data = SharedData.getInstance();
    data.setAPIKEY("0RUTLH7cqd6yrZ0FdS0NfQMO3lioiCbnH-BpNQQ");//set your map key here
    data.setSrc_lat(17);//set your src lat
    data.setSrc_lng(78);//set your src lng
    data.setDest_lat(18);//set your dest lat
    data.setDest_lng(77);//set your dest lng
    startActivity(new Intent(YourActivity.this,RoutePath.class));//add RoutePath in your manifeast file
    

    //Also add the permission to your manifeast file

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

Sidebar

Related Questions

At the moment I am using this to call the TabHost activity to change
At the moment I am only able to output this to a string, although
At the moment I'm using strstr() for getting the first part of a string.
At this moment I use this scenario to load OpenGL texture from PNG: load
at the moment i have this <div id=beau> <div> <input type=text id=lun name=lun size=24
At the moment my application.js file looks like this: //= require_tree ./vendor //= require_directory
In the moment I can add li tags to my list with script. But
At this moment I think about authentication in my web app based on Strust2.
at the moment i am using a while (true) loop to do this. I
At the moment I have this: try{ // Create file FileWriter fstream = new

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.