Hi Andrew,
It's an android application, so here is the pretty simple source code
that produces that annoying red square on the map:
import android.*;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Point;
import android.location.Address;
import android.location.Geocoder;
import android.view.*;
import android.widget.LinearLayout;
import android.widget.Toast;
import com.google.android.maps.*;
import com.google.android.maps.MapView.LayoutParams;
import android.os.Bundle;
import java.io.IOException;
import java.util.List;
import java.util.Locale;
public class MapsActivity extends MapActivity
{
static MapView mapView;
MapController mc;
GeoPoint p;
private static final int PREFERENCES_GROUP_ID=0;
private static final int SETTINGS_ID=Menu.FIRST;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
// Allow zooming
mapView = (MapView) findViewById(R.id.mapView);
mapView.setSatellite(true);
mapView.setBuiltInZoomControls(true);
mc = mapView.getController();
Geocoder geoCoder = new Geocoder(this, Locale.getDefault());
try {
List<Address> addresses = geoCoder.getFromLocationName(
"Palo Alto, CA", 5);
String add = "";
if (addresses.size() > 0) {
p = new GeoPoint(
(int) (addresses.get(0).getLatitude() * 1E6),
(int) (addresses.get(0).getLongitude() *
1E6));
}
} catch (IOException e) {
e.printStackTrace();
}
mc.animateTo(p);
mc.setZoom(17);
mapView.invalidate();
}
@Override
protected boolean isRouteDisplayed() {
return false;
}
}
Thanks
Matt
On Nov 2, 4:46 am, Andrew Leach <andrew.leac...@googlemail.com> wrote: