Search in sources :

Example 1 with SupportMapFragment

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);
}
Also used : SupportMapFragment(com.google.android.gms.maps.SupportMapFragment)

Example 2 with SupportMapFragment

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();
}
Also used : Window(android.view.Window) SupportMapFragment(com.google.android.gms.maps.SupportMapFragment) Bahnhof(de.bahnhoefe.deutschlands.bahnhofsfotos.model.Bahnhof) LatLng(com.google.android.gms.maps.model.LatLng) Toolbar(android.support.v7.widget.Toolbar)

Example 3 with SupportMapFragment

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);
}
Also used : SupportMapFragment(com.google.android.gms.maps.SupportMapFragment) LatLng(com.google.android.gms.maps.model.LatLng)

Example 4 with SupportMapFragment

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);
}
Also used : SupportMapFragment(com.google.android.gms.maps.SupportMapFragment) Activity(android.app.Activity)

Example 5 with SupportMapFragment

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;
}
Also used : SupportMapFragment(com.google.android.gms.maps.SupportMapFragment) MarkerOptions(com.google.android.gms.maps.model.MarkerOptions) GoogleMap(com.google.android.gms.maps.GoogleMap) OnMapReadyCallback(com.google.android.gms.maps.OnMapReadyCallback) LatLng(com.google.android.gms.maps.model.LatLng) View(android.view.View)

Aggregations

SupportMapFragment (com.google.android.gms.maps.SupportMapFragment)12 View (android.view.View)3 LatLng (com.google.android.gms.maps.model.LatLng)3 TextView (android.widget.TextView)2 Activity (android.app.Activity)1 Intent (android.content.Intent)1 Handler (android.os.Handler)1 Nullable (android.support.annotation.Nullable)1 BottomSheetBehavior (android.support.design.widget.BottomSheetBehavior)1 NavigationView (android.support.design.widget.NavigationView)1 ActionBarDrawerToggle (android.support.v7.app.ActionBarDrawerToggle)1 Toolbar (android.support.v7.widget.Toolbar)1 Window (android.view.Window)1 ImageView (android.widget.ImageView)1 BindView (butterknife.BindView)1 Place (com.bubelov.coins.model.Place)1 PlaceDetailsView (com.bubelov.coins.ui.widget.PlaceDetailsView)1 AdListener (com.google.android.gms.ads.AdListener)1 AdRequest (com.google.android.gms.ads.AdRequest)1 InterstitialAd (com.google.android.gms.ads.InterstitialAd)1