]> Pileus Git - ~andy/iBeaconNav/commitdiff
Add marker example
authorAndy Spencer <andy753421@gmail.com>
Mon, 17 Mar 2014 17:32:45 +0000 (17:32 +0000)
committerAndy Spencer <andy753421@gmail.com>
Mon, 17 Mar 2014 17:32:45 +0000 (17:32 +0000)
src/edu/ucla/iBeaconNav/Main.java

index e9fef307f33bd331de10afc4f7f1ffdf1b7cc25f..d6cc092df02781d8dd77d2b6aeccde9f80fed1a9 100644 (file)
@@ -31,7 +31,8 @@ import android.widget.Toast;
 
 import android.os.Bundle;
  
-import com.google.android.gms.maps.MapView;
+import com.google.android.gms.maps.*;
+import com.google.android.gms.maps.model.*;
 
 public class Main extends Activity
 {
@@ -254,8 +255,11 @@ public class Main extends Activity
                        });
 
                        // Get a handle to the Map Fragment
-                       //GoogleMap map = ((MapFragment)getFragmentManager()
-                       //      .findFragmentById(R.id.map_fragment)).getMap();
+                       GoogleMap map = ((MapFragment)getFragmentManager()
+                               .findFragmentById(R.id.map_fragment)).getMap();
+                       Marker mark = map.addMarker(new MarkerOptions()
+                                       .position(new LatLng(34.0722, -118.4441))
+                                       .title("UCLA"));
 
                        //LatLng sydney = new LatLng(-33.867, 151.206);