Search in sources :

Example 16 with SupportMapFragment

use of com.google.android.libraries.maps.SupportMapFragment in project android-samples by googlemaps.

the class LocationSourceDemoActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.basic_demo);
    mLocationSource = new LongPressLocationSource();
    SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);
    mapFragment.getMapAsync(this);
}
Also used : SupportMapFragment(com.google.android.libraries.maps.SupportMapFragment)

Example 17 with SupportMapFragment

use of com.google.android.libraries.maps.SupportMapFragment in project android-samples by googlemaps.

the class BasicMapDemoActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.basic_demo);
    SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);
    mapFragment.getMapAsync(this);
}
Also used : SupportMapFragment(com.google.android.libraries.maps.SupportMapFragment)

Example 18 with SupportMapFragment

use of com.google.android.libraries.maps.SupportMapFragment in project android-samples by googlemaps.

the class CameraDemoActivity method onCreate.

// [END_EXCLUDE]
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.camera_demo);
    // [START_EXCLUDE silent]
    animateToggle = findViewById(R.id.animate);
    customDurationToggle = findViewById(R.id.duration_toggle);
    customDurationBar = findViewById(R.id.duration_bar);
    updateEnabledState();
    // [END_EXCLUDE]
    SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);
    mapFragment.getMapAsync(this);
}
Also used : SupportMapFragment(com.google.android.libraries.maps.SupportMapFragment)

Example 19 with SupportMapFragment

use of com.google.android.libraries.maps.SupportMapFragment in project android-samples by googlemaps.

the class MarkerDemoActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.marker_demo);
    mTopText = (TextView) findViewById(R.id.top_text);
    mRotationBar = (SeekBar) findViewById(R.id.rotationSeekBar);
    mRotationBar.setMax(360);
    mRotationBar.setOnSeekBarChangeListener(this);
    mFlatBox = (CheckBox) findViewById(R.id.flat);
    mOptions = (RadioGroup) findViewById(R.id.custom_info_window_options);
    mOptions.setOnCheckedChangeListener(new OnCheckedChangeListener() {

        @Override
        public void onCheckedChanged(RadioGroup group, int checkedId) {
            if (mLastSelectedMarker != null && mLastSelectedMarker.isInfoWindowShown()) {
                // Refresh the info window when the info window's content has changed.
                mLastSelectedMarker.showInfoWindow();
            }
        }
    });
    SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);
    new OnMapAndViewReadyListener(mapFragment, this);
}
Also used : SupportMapFragment(com.google.android.libraries.maps.SupportMapFragment) OnCheckedChangeListener(android.widget.RadioGroup.OnCheckedChangeListener) RadioGroup(android.widget.RadioGroup)

Example 20 with SupportMapFragment

use of com.google.android.libraries.maps.SupportMapFragment in project android-samples by googlemaps.

the class MyLocationDemoActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.my_location_demo);
    SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);
    mapFragment.getMapAsync(this);
}
Also used : SupportMapFragment(com.google.android.libraries.maps.SupportMapFragment)

Aggregations

SupportMapFragment (com.google.android.libraries.maps.SupportMapFragment)27 RadioGroup (android.widget.RadioGroup)1 OnCheckedChangeListener (android.widget.RadioGroup.OnCheckedChangeListener)1 FragmentTransaction (androidx.fragment.app.FragmentTransaction)1 GoogleMap (com.google.android.libraries.maps.GoogleMap)1 OnMapReadyCallback (com.google.android.libraries.maps.OnMapReadyCallback)1 OnStreetViewPanoramaReadyCallback (com.google.android.libraries.maps.OnStreetViewPanoramaReadyCallback)1 StreetViewPanorama (com.google.android.libraries.maps.StreetViewPanorama)1 SupportStreetViewPanoramaFragment (com.google.android.libraries.maps.SupportStreetViewPanoramaFragment)1 LatLng (com.google.android.libraries.maps.model.LatLng)1 MarkerOptions (com.google.android.libraries.maps.model.MarkerOptions)1