i have built an app that does some cordinate claculation for me. it works well it retreives points froma database i built as well. What i want to do now is when a menu button is pressed display a map. I did a tutorial that is simplay a map display.. thats all it does when it runs. but when i try to incorporate what i have done in my app..I have no luck at all.
So here are some of the items i have done and mabey someone can help me.
Here are the important liens from my android manifest.xml
<uses-library android:name="com.google.android.maps" android:required="true"/>
<uses-permission android:name="android.permission.INTERNET" />
Here is the the XML for the map display activity
<com.google.android.maps.MapView
android:id="@+id/mapView"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:enabled="true"
android:clickable="true"
android:apiKey="0EVD3Q_WMbtaa_vIjrPoaiN7Egbs8amSorNF-qw"
/>
I have a menu item in my main application that i want to invoke the map( i want to pass coordinates too it later.. but right now if it would just simply display I would be happy) In this code it is the case statement 3 that i am trying to invoke the map.
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case 1:
String v_band1 = spin2.getSelectedItem().toString();
Intent myIntent2 = new Intent(Tower.this, BuildList.class);
myIntent2.putExtra("BAND", v_band1);
Tower.this.startActivity(myIntent2);
return true;
case 2:
Intent myIntent = new Intent(Tower.this, Activity2.class);
Tower.this.startActivity(myIntent);
return true;
case 3:
Intent myIntent1 = new Intent(Tower.this, Mapit.class);
Tower.this.startActivity(myIntent1);
return true;
case 4:
loadspinner();
return true;
}
return false;
}
in the test app ther is an import line at the top of the class
import com.google.android.maps.MapActivity;
In my new app when you start typing in the import statement you get to "import com.google.android.maps." and the MapActivity or anything will not come up to select as it did in the test tutorial. What am i doing wrong?? I have tried pasted my entire Android Manfiest.xml asa well as the XML from the view to display the map, in here but the whole thing does not show up. So i added the googlmaps line to show you i use it.
<uses-library android:name="com.google.android.maps" android:required="true"/>