Search in sources :

Example 1 with TileOverlay

use of com.google.android.gms.maps.model.TileOverlay in project android-maps-utils by googlemaps.

the class HeatmapsPlacesDemoActivity method makeCheckBox.

/**
     * Creates check box for a given search term
     *
     * @param keyword the search terms associated with the check box
     */
private void makeCheckBox(final String keyword) {
    mCheckboxLayout.setVisibility(View.VISIBLE);
    // Make new checkbox
    CheckBox checkBox = new CheckBox(this);
    checkBox.setText(keyword);
    checkBox.setTextColor(HEATMAP_COLORS[mOverlaysRendered]);
    checkBox.setChecked(true);
    checkBox.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View view) {
            CheckBox c = (CheckBox) view;
            // Text is the keyword
            TileOverlay overlay = mOverlays.get(keyword);
            if (overlay != null) {
                overlay.setVisible(c.isChecked());
            }
        }
    });
    mCheckboxLayout.addView(checkBox);
}
Also used : CheckBox(android.widget.CheckBox) View(android.view.View) TextView(android.widget.TextView) TileOverlay(com.google.android.gms.maps.model.TileOverlay)

Example 2 with TileOverlay

use of com.google.android.gms.maps.model.TileOverlay in project iosched by google.

the class MapFragment method setFloorElementsVisible.

/**
     * Change the visibility of all Markers and TileOverlays for a floor.
     */
private void setFloorElementsVisible(int floor, boolean visible) {
    // Overlays
    final TileOverlay overlay = mTileOverlays.get(floor);
    if (overlay != null) {
        overlay.setVisible(visible);
    }
    // Markers
    final ArrayList<Marker> markers = mMarkersFloor.get(floor);
    if (markers != null) {
        for (Marker m : markers) {
            m.setVisible(visible);
        }
    }
}
Also used : Marker(com.google.android.gms.maps.model.Marker) TileOverlay(com.google.android.gms.maps.model.TileOverlay)

Aggregations

TileOverlay (com.google.android.gms.maps.model.TileOverlay)2 View (android.view.View)1 CheckBox (android.widget.CheckBox)1 TextView (android.widget.TextView)1 Marker (com.google.android.gms.maps.model.Marker)1