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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T10:29:50+00:00 2026-05-21T10:29:50+00:00

I’m making an app that needs to show a location that I define with

  • 0

I’m making an app that needs to show a location that I define with latitude and longitude. Everything goes fine, it opens Google maps in my app screen but the maps won’t show up!
This is the code I use…

public class MapsActivity extends MapActivity {

MapView mapView;
MapController mc;
GeoPoint p;

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    //vraag custom title bar
    requestCustomTitle();
    setContentView(R.layout.mapsactivity);
    //Titel dynamisch invullen volgens taalvoorkeuren, roept methode setCustomTitle op
    setCustomTitle(getResources().getString(R.string.MapsTitel));


    showZoom();
    locate(getIntent().getStringExtra("kantoorLat"), getIntent().getStringExtra("kantoorLng"));
    addMarker();

}
/*
 * De methode showZoom zorgt ervoor dat de zoombuttons worden getoond
 */

private void showZoom(){
    mapView = (MapView) findViewById(R.id.mapView);
    LinearLayout zoomLayout = (LinearLayout)findViewById(R.id.zoom);
    View zoomView = mapView.getZoomControls();

    zoomLayout.addView(zoomView, new LinearLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
    mapView.displayZoomControls(true);
}

/*
 * De methode locate zorgt ervoor dat de juiste locatie wordt getoond
 */
private void locate(String strlat, String strlng){
    mc = mapView.getController();
    String coordinates[] = {strlat,strlng};
    double lat = Double.parseDouble(coordinates[0]);
    double lng = Double.parseDouble(coordinates[1]);

    p = new GeoPoint((int)(lat * 1E6), (int)(lng * 1E6));
    mc.animateTo(p);
    mc.setZoom(17);
    mapView.invalidate();
}

/*
 * De methode addMarker zorgt ervoor dat er een indicator staat op de locatie
 */
private void addMarker(){
    MapOverlay mapOverlay = new MapOverlay();
    List<Overlay> listOfOverlays = mapView.getOverlays();
    listOfOverlays.clear();
    listOfOverlays.add(mapOverlay);
}

protected boolean isRouteDisplayed(){
    return false;
}

class MapOverlay extends com.google.android.maps.Overlay{
    @Override
    public boolean draw(Canvas canvas, MapView mapView, boolean shadow, long when){
        super.draw(canvas, mapView, shadow);

        Point screenPts = new Point();
        mapView.getProjection().toPixels(p,screenPts);

        Bitmap bmp = BitmapFactory.decodeResource(getResources(), R.drawable.accentindicator);
        canvas.drawBitmap(bmp, screenPts.x+7, screenPts.y-19, null);
        return true;
    }
}
  • 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-21T10:29:51+00:00Added an answer on May 21, 2026 at 10:29 am

    MD5 key will not work on different machines.

    You need to generate MD5 debug key for the current SDK that you are using.

    Generate the debug key for your current machine and try again.

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

Sidebar

Related Questions

I'm making a simple page using Google Maps API 3. My first. One marker
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a French site that I want to parse, but am running into
We're building an app, our first using Rails 3, and we're having to build
Seemingly simple, but I cannot find anything relevant on the web. What is the
Does anyone know how can I replace this 2 symbol below from the string
this is what i have right now Drawing an RSS feed into the php,
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out

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.