Search in sources :

Example 1 with UiSettings

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

the class TagsDemoActivity method onMapReady.

@Override
public void onMapReady(GoogleMap map) {
    mMap = map;
    UiSettings mUiSettings = mMap.getUiSettings();
    // Turn off the map toolbar.
    mUiSettings.setMapToolbarEnabled(false);
    // Disable interaction with the map - other than clicking.
    mUiSettings.setZoomControlsEnabled(false);
    mUiSettings.setScrollGesturesEnabled(false);
    mUiSettings.setZoomGesturesEnabled(false);
    mUiSettings.setTiltGesturesEnabled(false);
    mUiSettings.setRotateGesturesEnabled(false);
    // Add a circle, a ground overlay, a marker, a polygon and a polyline to the map.
    addObjectsToMap();
    // Set listeners for click events.  See the bottom of this class for their behavior.
    mMap.setOnCircleClickListener(this);
    mMap.setOnGroundOverlayClickListener(this);
    mMap.setOnMarkerClickListener(this);
    mMap.setOnPolygonClickListener(this);
    mMap.setOnPolylineClickListener(this);
    // Override the default content description on the view, for accessibility mode.
    // Ideally this string would be localised.
    map.setContentDescription(getString(R.string.tags_demo_map_description));
    // Create bounds that include all locations of the map.
    LatLngBounds bounds = new LatLngBounds.Builder().include(ADELAIDE).include(BRISBANE).include(DARWIN).include(HOBART).include(PERTH).include(SYDNEY).build();
    mMap.moveCamera(CameraUpdateFactory.newLatLngBounds(bounds, 100));
}
Also used : UiSettings(com.google.android.libraries.maps.UiSettings) LatLngBounds(com.google.android.libraries.maps.model.LatLngBounds)

Aggregations

UiSettings (com.google.android.libraries.maps.UiSettings)1 LatLngBounds (com.google.android.libraries.maps.model.LatLngBounds)1