use of com.google.android.gms.maps.SupportMapFragment in project HoloEverywhere by Prototik.
the class MainActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.i619_main);
SupportMapFragment fragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);
Log.v("i619", "Fragment: " + fragment);
}
use of com.google.android.gms.maps.SupportMapFragment in project RSAndroidApp by RailwayStations.
the class MapsActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_maps_activity);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Window window = getWindow();
window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);
window.setStatusBarColor(Color.parseColor("#c71c4d"));
}
Toolbar myToolbar = (Toolbar) findViewById(R.id.maps_toolbar);
setSupportActionBar(myToolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
BaseApplication baseApplication = (BaseApplication) getApplication();
dbAdapter = baseApplication.getDbAdapter();
// Obtain the SupportMapFragment and get notified when the map is ready to be used.
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);
mapFragment.getMapAsync(this);
// no markers until we know where we are
bahnhofMarker = new ArrayList<Bahnhof>(0);
myPos = new LatLng(50d, 8d);
buildGoogleApiClient();
}
use of com.google.android.gms.maps.SupportMapFragment in project RSAndroidApp by RailwayStations.
the class MapsAllActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_all_maps_activity);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
// Obtain the SupportMapFragment and get notified when the map is ready to be used.
SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);
mapFragment.getMapAsync(this);
BaseApplication baseApplication = (BaseApplication) getApplication();
dbAdapter = baseApplication.getDbAdapter();
bahnhofMarker = dbAdapter.getAllBahnhoefe(false);
myPos = new LatLng(51d, 10d);
}
use of com.google.android.gms.maps.SupportMapFragment in project Ushahidi_Android by ushahidi.
the class BaseMapActivity method onCreate.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (mapViewId != 0) {
if (checkForGMap()) {
SupportMapFragment mapFrag = (SupportMapFragment) getSupportFragmentManager().findFragmentById(mapViewId);
mapView = mapFrag.getMap();
Preferences.loadSettings(this);
// set up map tile
Util.setMapTile(this, mapView);
super.map = mapView;
}
}
if (locationManager == null) {
locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
}
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
view = Objects.createInstance(viewClass, Activity.class, this);
}
use of com.google.android.gms.maps.SupportMapFragment in project NPSmiles by bmcglynn1.
the class ItemOneFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.activity_contact_page, container, false);
SupportMapFragment mapFragment = (SupportMapFragment) getChildFragmentManager().findFragmentById(R.id.map);
OnMapReadyCallback obj = new OnMapReadyCallback() {
@Override
public void onMapReady(GoogleMap googleMap) {
mMap = googleMap;
LatLng smiles = new LatLng(39.104729, -77.191294);
mMap.addMarker(new MarkerOptions().position(smiles).title("North Potomac Smiles, LLC."));
mMap.moveCamera(CameraUpdateFactory.newLatLng(smiles));
mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(smiles, 16));
}
};
mapFragment.getMapAsync(obj);
return view;
}
Aggregations