本文整理汇总了Java中com.google.android.gms.maps.model.Marker.setVisible方法的典型用法代码示例。如果您正苦于以下问题:Java Marker.setVisible方法的具体用法?Java Marker.setVisible怎么用?Java Marker.setVisible使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.android.gms.maps.model.Marker
的用法示例。
在下文中一共展示了Marker.setVisible方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setFloorElementsVisible
import com.google.android.gms.maps.model.Marker; //导入方法依赖的package包/类
/**
* 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);
}
}
}
示例2: refreshMarker
import com.google.android.gms.maps.model.Marker; //导入方法依赖的package包/类
/**
* Refreshes the marker according to its appearance strategy.
*
* @param marker marker object
*/
private void refreshMarker(com.ubudu.gmaps.model.Marker marker) {
Marker m = customMarkersMap.get(marker);
MarkerOptions mO = marker.getOptions();
m.setIcon(mO.getIcon());
m.setZIndex(mO.getZIndex());
m.setVisible(mO.isVisible());
m.setAlpha(mO.getAlpha());
m.setDraggable(mO.isDraggable());
m.setFlat(mO.isFlat());
m.setAnchor(mO.getAnchorV(),mO.getAnchorU());
m.setRotation(mO.getRotation());
m.setSnippet(mO.getSnippet());
m.setTitle(marker.getTitle());
}
示例3: refreshZone
import com.google.android.gms.maps.model.Marker; //导入方法依赖的package包/类
/**
* Refreshes the polygon and label marker of the given zone according to zone's appearance options.
*
* @param zone zone object
*/
private void refreshZone(Zone zone) {
Pair<Marker,Polygon> markerAndPolygon = zoneVsMarkerAndPolygonMap.get(zone);
ZoneOptions zoneOptions = zone.getOptions();
//update polygon
Polygon p = markerAndPolygon.second;
PolygonOptions polygonOptions = zoneOptions.getPolygonOptions();
p.setStrokeColor(polygonOptions.getStrokeColor());
p.setStrokeWidth(polygonOptions.getStrokeWidth());
p.setFillColor(polygonOptions.getFillColor());
p.setGeodesic(polygonOptions.isGeodesic());
p.setHoles(polygonOptions.getHoles());
p.setVisible(polygonOptions.isVisible());
p.setZIndex(polygonOptions.getZIndex());
p.setClickable(polygonOptions.isClickable());
Log.i(TAG,"updated polygon id: "+p.getId());
//update label marker
Marker m = markerAndPolygon.first;
ZoneLabelOptions zoneLabelOptions = zoneOptions.getZoneLabelOptions();
MarkerOptions mO = zoneLabelOptions.getLabelMarkerOptions();
if(zoneLabelOptions.isDisplayLabel())
mO.icon(BitmapDescriptorFactory.fromBitmap(getLabelBitmap(zone.getName(),zoneLabelOptions)));
m.setIcon(mO.getIcon());
m.setZIndex(mO.getZIndex());
m.setVisible(mO.isVisible());
m.setAlpha(mO.getAlpha());
m.setAnchor(mO.getAnchorV(),mO.getAnchorU());
m.setDraggable(mO.isDraggable());
m.setFlat(mO.isFlat());
m.setInfoWindowAnchor(mO.getInfoWindowAnchorV(),mO.getInfoWindowAnchorU());
m.setRotation(mO.getRotation());
m.setSnippet(mO.getSnippet());
m.setTitle(zone.getName());
}
示例4: setVisibleMarkers
import com.google.android.gms.maps.model.Marker; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void setVisibleMarkers(boolean visible) {
for (Marker marker : markers) {
marker.setVisible(visible);
}
}
示例5: setVisible
import com.google.android.gms.maps.model.Marker; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void setVisible(boolean visible) {
if (polygon != null) {
polygon.setVisible(visible);
}
for (Marker marker : markers) {
marker.setVisible(visible);
}
for (PolygonHoleMarkers hole : holes) {
hole.setVisible(visible);
}
}
示例6: setVisibleMarkers
import com.google.android.gms.maps.model.Marker; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void setVisibleMarkers(boolean visible) {
for (Marker marker : markers) {
marker.setVisible(visible);
}
for (PolygonHoleMarkers hole : holes) {
hole.setVisibleMarkers(visible);
}
}