Skip to content

Instantly share code, notes, and snippets.

@FilHazer
Created January 14, 2016 12:33
Show Gist options
  • Save FilHazer/b043b4599d7c9615eedd to your computer and use it in GitHub Desktop.
Save FilHazer/b043b4599d7c9615eedd to your computer and use it in GitHub Desktop.
LatLng position = new LatLng(37.77493, -122.41942);
String markerText = "San Fransisco";
...
public void onMapReady(GoogleMap googleMap) {
Log.i("DEBUG", "onMapReady");
//add marker
Marker marker = googleMap.addMarker(new MarkerOptions().position(position).title(markerText));
//zoom to position with level 16
CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngZoom(position, 16);
googleMap.animateCamera(cameraUpdate);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment