Click here to Skip to main content
15,887,446 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Personally, I'm a problem, since a while I can not solve, I tried several ways and nothing .... then I'm doing an APP location pretty simple, but does not load, is only in Blank Screen (Cartesian plane). Below is the source code. Who can help me, I'm new to Android application.

AndroidManifest.xml
HTML
package nl.codestone.cookbook.maptest;

import android.os.Bundle;

import com.google.android.maps.MapActivity;
import com.google.android.maps.MapView;

public class MapTest 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); 
    
    }

    @Override
    protected boolean isRouteDisplayed() {
        return false;
    }
}



main.xml
XML
<?xml version="1.0" encoding="utf-8"?>

<com.google.android.maps.MapView  
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/mapview"
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:apiKey="AIzaSyBLRbJiQXyenW5t5P0U4tjxfWQhpDpfbcA"
    android:clickable="true"
    />


MapTest.java
Java
package nl.codestone.cookbook.maptest;

import android.os.Bundle;

import com.google.android.maps.MapActivity;
import com.google.android.maps.MapView;

public class MapTest 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); 
    
    }

    @Override
    protected boolean isRouteDisplayed() {
        return false;
    }
}
Posted
Updated 2-Aug-13 12:34pm
v2

1 solution

You may have problem in creating proper key:

Please, Check following links: 1. Answer for same question[^]

2. You can see here : Full Tutorial for Creating Map[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900