Search in sources :

Example 11 with SupportMapFragment

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

the class CameraClampingDemoActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.camera_clamping_demo);
    mMap = null;
    resetMinMaxZoom();
    mCameraTextView = (TextView) findViewById(R.id.camera_text);
    SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);
    mapFragment.getMapAsync(this);
}
Also used : SupportMapFragment(com.google.android.libraries.maps.SupportMapFragment)

Example 12 with SupportMapFragment

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

the class CircleDemoActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.circle_demo);
    fillHueBar = findViewById(R.id.fillHueSeekBar);
    fillHueBar.setMax(MAX_HUE_DEGREES);
    fillHueBar.setProgress(MAX_HUE_DEGREES / 2);
    fillAlphaBar = findViewById(R.id.fillAlphaSeekBar);
    fillAlphaBar.setMax(MAX_ALPHA);
    fillAlphaBar.setProgress(MAX_ALPHA / 2);
    strokeWidthBar = findViewById(R.id.strokeWidthSeekBar);
    strokeWidthBar.setMax(MAX_WIDTH_PX);
    strokeWidthBar.setProgress(MAX_WIDTH_PX / 3);
    strokeHueBar = findViewById(R.id.strokeHueSeekBar);
    strokeHueBar.setMax(MAX_HUE_DEGREES);
    strokeHueBar.setProgress(0);
    strokeAlphaBar = findViewById(R.id.strokeAlphaSeekBar);
    strokeAlphaBar.setMax(MAX_ALPHA);
    strokeAlphaBar.setProgress(MAX_ALPHA);
    strokePatternSpinner = findViewById(R.id.strokePatternSpinner);
    strokePatternSpinner.setAdapter(new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, getResourceStrings(PATTERN_TYPE_NAME_RESOURCE_IDS)));
    clickabilityCheckbox = findViewById(R.id.toggleClickability);
    SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);
    mapFragment.getMapAsync(this);
}
Also used : SupportMapFragment(com.google.android.libraries.maps.SupportMapFragment)

Example 13 with SupportMapFragment

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

the class EventsDemoActivity method onCreate.

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

Example 14 with SupportMapFragment

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

the class GroundOverlayDemoActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.ground_overlay_demo);
    transparencyBar = findViewById(R.id.transparencySeekBar);
    transparencyBar.setMax(TRANSPARENCY_MAX);
    transparencyBar.setProgress(0);
    SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);
    mapFragment.getMapAsync(this);
}
Also used : SupportMapFragment(com.google.android.libraries.maps.SupportMapFragment)

Example 15 with SupportMapFragment

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

the class LayersDemoActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.layers_demo);
    mSpinner = (Spinner) findViewById(R.id.layers_spinner);
    ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this, R.array.layers_array, android.R.layout.simple_spinner_item);
    adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
    mSpinner.setAdapter(adapter);
    mSpinner.setOnItemSelectedListener(this);
    mTrafficCheckbox = (CheckBox) findViewById(R.id.traffic);
    mMyLocationCheckbox = (CheckBox) findViewById(R.id.my_location);
    mBuildingsCheckbox = (CheckBox) findViewById(R.id.buildings);
    mIndoorCheckbox = (CheckBox) findViewById(R.id.indoor);
    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