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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T21:22:08+00:00 2026-06-07T21:22:08+00:00

I am working in google maps… i did the bellow application and it was

  • 0

I am working in google maps…

i did the bellow application and it was working fine then suddenly it stoped working and I trace it from the begining and I found that when I add

 mapOverlays = mapView.getOverlays();

the application stops working…

I need a help please

public class MapGtugActivity extends MapActivity implements OnClickListener  {
MapView mapView ; 
MyLocationOverlay compass ; 
MapController controller ; 
Drawable drawable ; 
Drawable drawable2 ; 
List<Overlay> mapOverlays ; 
GeoPoint point1 ; 
GeoPoint point2 ; 
GeoPoint point3 ;
MapItemizedOverlay custom ; 
MapItemizedOverlay custom2 ; 
//List <GeoPoint> LGP ; 
 GeoPoint LGP[] = new GeoPoint[6] ; 
 Button AddLayers ; 

 int x , y ; 
 GeoPoint touchedpoint ;
 long start ; 
 long stop ;



   CharSequence[] items = {"Layer1", "Layer2"};
   boolean[] itemsChecked = new boolean[items.length];



/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    MapView mapview = (MapView) findViewById(R.id.mapview) ;
    mapview.setBuiltInZoomControls(true) ; 

    mapOverlays = mapView.getOverlays();




}

@Override
protected boolean isRouteDisplayed() {
    // TODO Auto-generated method stub
    return false;
}

public void onClick(View v) {
    // TODO Auto-generated method stub

}

}

  • 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-07T21:22:09+00:00Added an answer on June 7, 2026 at 9:22 pm

    You can only make calls to getOverlays after you have added overlays. I think its returning nullpointerException at that point (because ur calling it in onCreate). Because when getOverlays() is called there is no overlay defined on ur map for it to get.

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

Sidebar

Related Questions

I'm working with a Google Maps example code , this : http://www.wolfpil.de/v3/drag-from-outside.html which has
I'm having problems with google maps, drawing icons was working fine few weeks ago
I'm working on a pretty complex web application in Ext with Google maps API
I have a v3 Google Maps working fine with dynamic markers but I am
I'm working on an advanced map application in Google Maps API V3. I'm using
I am working on silverlight 4 application and need to implement google maps in
I am working on Google Maps Javascript API V 3. Everything is working fine
I am working on Google map application using Google Maps JavaScript API V2 .
I'm working with the Google Maps Geocoder. I've got everything working fine, but I
I'm working on an application using Google Maps to display some data for a

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.