Skip to content

Instantly share code, notes, and snippets.

@FilHazer FilHazer/MapsFragment.java Secret
Created Jan 14, 2016

Embed
What would you like to do?
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
You can’t perform that action at this time.