use of com.google.android.gms.maps.MapFragment in project cw-omnibus by commonsguy.
the class MainActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (readyToGo()) {
setContentView(R.layout.activity_main);
MapFragment mapFrag = (MapFragment) getFragmentManager().findFragmentById(R.id.map);
if (savedInstanceState == null) {
needsInit = true;
}
mapFrag.getMapAsync(this);
}
}
use of com.google.android.gms.maps.MapFragment in project cw-omnibus by commonsguy.
the class MainActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (readyToGo()) {
setContentView(R.layout.activity_main);
MapFragment mapFrag = (MapFragment) getFragmentManager().findFragmentById(R.id.map);
if (savedInstanceState == null) {
needsInit = true;
}
mapFrag.getMapAsync(this);
}
}
use of com.google.android.gms.maps.MapFragment in project google-io-2014 by romainguy.
the class DetailActivity method setupMap.
private void setupMap() {
GoogleMap map = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();
double lat = getIntent().getDoubleExtra("lat", 37.6329946);
double lng = getIntent().getDoubleExtra("lng", -122.4938344);
float zoom = getIntent().getFloatExtra("zoom", 15.0f);
LatLng position = new LatLng(lat, lng);
map.moveCamera(CameraUpdateFactory.newLatLngZoom(position, zoom));
map.addMarker(new MarkerOptions().position(position));
}
use of com.google.android.gms.maps.MapFragment in project coins-android by bubelov.
the class PickLocationActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_pick_location);
ButterKnife.bind(this);
initialLocation = getIntent().getParcelableExtra(LOCATION_EXTRA);
toolbar.setNavigationOnClickListener(view -> supportFinishAfterTransition());
toolbar.inflateMenu(R.menu.pick_location);
toolbar.setOnMenuItemClickListener(item -> {
if (item.getItemId() == R.id.action_done) {
Intent data = new Intent();
data.putExtra(LOCATION_EXTRA, map.getCameraPosition().target);
setResult(RESULT_OK, data);
supportFinishAfterTransition();
return true;
}
return false;
});
MapFragment mapFragment = (MapFragment) getFragmentManager().findFragmentById(R.id.map);
mapFragment.getMapAsync(this);
}
use of com.google.android.gms.maps.MapFragment in project cw-omnibus by commonsguy.
the class MainActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (readyToGo()) {
setContentView(R.layout.activity_main);
MapFragment mapFrag = (MapFragment) getFragmentManager().findFragmentById(R.id.map);
if (savedInstanceState == null) {
mapFrag.getMapAsync(this);
}
}
}
Aggregations