Ok I’ve asked this before. Got one answer. I’m going to go more in depth on what I’m doing. I’m creating a app for a business that has multiple stores. I have a layout that shows button to each store. click on one of the buttons it takes you to another view with two buttons on it. In this view theres a button that when u click it it calls the store for u, got that working just fine. the other button in the same view when u click it it takes you to Google maps and shows u where the location of the store is. This all works fine. But what i want is a marker to show up on the map as well. I don’t need it to do anything but show the customer this is where the store is located. This is my code I’m using—>
import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapController;
import com.google.android.maps.MapView;
import com.google.android.maps.MyLocationOverlay;
import android.os.Bundle;
public class Main extends MapActivity {
MapController mControl;
GeoPoint GeoP;
MapView navView;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
navView = (MapView) findViewById(R.id.navView);
navView.displayZoomControls(true);
navView.setBuiltInZoomControls(true);
navView.setSatellite(true);
navView.getOverlays().add(new MyLocationOverlay(this,navView));
double lat = 40.325874;
double longi = -76.002211;
GeoP = new GeoPoint((int) ( lat *1E6), (int) (longi * 1E6));
mControl = navView.getController();
mControl.animateTo(GeoP);
mControl.setZoom(20);
}
@Override
protected boolean isRouteDisplayed() {
// TODO Auto-generated method stub
return false;
}
}
@Erik Graul
Check this tutorial , it will help you
http://mobiforge.com/developing/story/using-google-maps-android