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);
}
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);
}
}
}
Aggregations