Search in sources :

Example 6 with SupportMapFragment

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

the class SnapshotDemoActivity method onCreate.

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

Example 7 with SupportMapFragment

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

the class MarkerCloseInfoWindowOnRetapDemoActivity method onCreate.

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

Example 8 with SupportMapFragment

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

the class PolygonDemoActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.polygon_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);
    strokeJointTypeSpinner = findViewById(R.id.strokeJointTypeSpinner);
    strokeJointTypeSpinner.setAdapter(new ArrayAdapter<>(this, android.R.layout.simple_spinner_item, getResourceStrings(JOINT_TYPE_NAME_RESOURCE_IDS)));
    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 9 with SupportMapFragment

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

the class IndoorDemoActivity method onCreate.

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

Example 10 with SupportMapFragment

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

the class LiteDemoActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    // Set the layout
    setContentView(R.layout.lite_demo);
    // Get the map and register for the ready callback
    SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map);
    new OnMapAndViewReadyListener(mapFragment, 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