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

  • Home
  • SEARCH
  • 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 7966873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T06:33:01+00:00 2026-06-04T06:33:01+00:00

Trying to do a map example I found here http://codemagician.wordpress.com/2010/05/06/android-google-mapview-tutorial-done-right/ The problem is this

  • 0

Trying to do a map example I found here
http://codemagician.wordpress.com/2010/05/06/android-google-mapview-tutorial-done-right/

The problem is this code. Specifically, the compiler does not seem to know what a MapView is? In fact, also applies to android.graphics.drawable.Drawable. I thought that the import statement would resolve that but must be missing some other setup step.

Any help appreciated.

package com.example.HelloGoogleMaps2;
import java.util.List;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapView;
import com.google.android.maps.Overlay;
import com.google.android.maps.OverlayItem;

public class MainMap extends MapActivity
{
 @Override
 public void onCreate(Bundle savedInstanceState)
 {
     super.onCreate(savedInstanceState);
     setContentView(R.layout.main);

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

     List<Overlay> mapOverlays = mapView.getOverlays();
     **Drawable** drawable = this.getResources().getDrawable(R.drawable.icon);
     HelloItemizedOverlay itemizedoverlay = new HelloItemizedOverlay(drawable,this);
     GeoPoint point = new GeoPoint(30443769,-91158458);
     OverlayItem overlayitem = new OverlayItem(point, "Laissez les bon temps rouler!", "I'm in Louisiana!");

     GeoPoint point2 = new GeoPoint(17385812,78480667);
     OverlayItem overlayitem2 = new OverlayItem(point2, "Namashkaar!", "I'm in Hyderabad, India!");

     itemizedoverlay.addOverlay(overlayitem);
     itemizedoverlay.addOverlay(overlayitem2);

     mapOverlays.add(itemizedoverlay);
 }
 @Override
 protected boolean isRouteDisplayed()
 {
 return false;
 }
}
  • 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-04T06:33:02+00:00Added an answer on June 4, 2026 at 6:33 am

    Check your target device when you create new project. It should be Google APIs(Google Inc.)-API Level -(whatever you want).

    as doc says :”you must have an AVD configured to use the Google APIs target, or be using a development device that includes the Maps library“.And make sure you have Internet Permission

    <uses-permission android:name="android.permission.INTERNET"/>
    

    and as MapView is not included in the default Android libraries, so you need to
    specify in AndroidManifest.xml

    <uses-library android:name="com.google.android.maps" />
    

    and here is a good place to start with google maps

    are you sure you have selected google api

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

Sidebar

Related Questions

Im trying to understand what a functor is, i found this tutorial/example: http://en.wikibooks.org/wiki/Haskell/Solutions/Applicative_Functors data
I am trying to produce a heat map using ggplot2. I found this example
I am trying to map a legacy database here and I'm running into a
I'm trying to use the example found in: example , and I can get
I'm trying to set up a subdomain-to-repository translation in Apache. Example: foobars.domain.com -> /server/svnrepos/foobars
I'm trying to migrate my application to latest version of Google map API and
We are now trying to build a map library like google/bing/yahoo,we will use it
I am trying to use ProGuard with Android. I have found several ProGuard scrips
Trying to map the following schema using the Entity Framework. A Customer can have
Im trying to map urls to numbers in a range [0,50] for porting, that

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.