Skip to content

Commit cf4bc52

Browse files
committed
added API key for GMaps v2
1 parent 048f4fa commit cf4bc52

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

android/GoogleMapsV2CustomBalloons/AndroidManifest.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
android:theme="@style/AppTheme" >
3636
<meta-data
3737
android:name="com.google.android.maps.v2.API_KEY"
38-
android:value="your_api_key" />
38+
android:value="AIzaSyAgeMHmvUQww2xFwB9hBzsUBFwgfZgNcfQ" />
3939

4040
<activity
4141
android:name="com.hrupin.sample.googlemapsv2customballoons.MainActivity"

android/GoogleMapsV2CustomBalloons/src/com/hrupin/sample/googlemapsv2customballoons/MainActivity.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import android.os.Bundle;
44
import android.support.v4.app.FragmentActivity;
55

6+
import com.google.android.gms.maps.CameraUpdateFactory;
67
import com.google.android.gms.maps.GoogleMap;
78
import com.google.android.gms.maps.SupportMapFragment;
89
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
@@ -23,9 +24,10 @@ protected void onCreate(Bundle savedInstanceState) {
2324
map = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMap();
2425

2526
if (map != null) {
26-
map.addMarker(new MarkerOptions().position(LOS_ANGELES).title("Los Angeles"));
27+
map.addMarker(new MarkerOptions().position(LOS_ANGELES).title("Los Angeles")).showInfoWindow();
2728
map.addMarker(new MarkerOptions().position(SAN_FRANCISCO).title("San Francisco")
2829
.icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_launcher)));
30+
map.animateCamera(CameraUpdateFactory.newLatLng(LOS_ANGELES));
2931
}
3032
}
3133

0 commit comments

Comments
 (0)