public void hideAll() { for (Marker marker : mMarkers) { marker.setVisible(false); } }
public void showAll() { for (Marker marker : mMarkers) { marker.setVisible(true); } }
public void addAll(java.util.Collection<MarkerOptions> opts, boolean defaultVisible) { for (MarkerOptions opt : opts) { addMarker(opt).setVisible(defaultVisible); } }
marker.setVisible(isVisible); setMarkerInfoWindow(style, marker, placemark); if (hasDrawOrder) {
@Override public void setVisible(boolean visible) { marker.setVisible(visible); }
@Override protected void onPostExecute(BitmapDescriptor result) { Marker marker = target.get(); if(marker != null) { marker.setIcon(result); marker.setVisible(true); } } }
public void setDestPosition(LatLng z) { destMarker.setPosition(z); destMarker.setVisible(true); }
private void updateLocationCircleColor() { // If the user is on the floor that is visible on Google Maps, show a blue circle. // Otherwise show a gray circle if (mCircle != null) { if (mFloorLevelMatcher.isIALocationOnActiveLevel()) { mCircle.setFillColor(ACTIVE_LEVEL_BLUE_DOT_COLOR); mMarker.setVisible(true); } else { mCircle.setFillColor(OTHER_LEVEL_BLUE_DOT_COLOR); mMarker.setVisible(false); } } }
public void setVisible(boolean visible) { if (marker != null) { marker.setVisible(visible); } else if (visible) { markerOptions.visible(true); createMarker(); } }
@Override public void onBackPressed() { if (routeHasBeenDrawn) { //Remove Route if drawn if (destMarker != null) { if (destMarker.isVisible()) { destMarker.setVisible(false); } } for (int a = 0; a <= routeParts; a++) { completeRoute[a].remove(); } routeHasBeenDrawn = false; setFollowOn(); View viewLine = findViewById(R.id.view156); if (viewLine != null) { viewLine.setVisibility(View.INVISIBLE); } TextView mapText = (TextView) findViewById(R.id.mapText); if (mapText != null) { mapText.setVisibility(View.INVISIBLE); } } else { super.onBackPressed(); } }
/** * Adds a single geometry object to the map with its specified style * * @param geometry defines the type of object to add to the map * @param style defines styling properties to add to the object when added to the map * @return the object that was added to the map, this is a Marker, Polyline, Polygon or an array * of either objects */ private Object addToMap(KmlPlacemark placemark, KmlGeometry geometry, KmlStyle style, KmlStyle inlineStyle, boolean isVisible) { String geometryType = geometry.getGeometryType(); if (geometryType.equals("Point")) { Marker marker = addPointToMap(placemark, (KmlPoint) geometry, style, inlineStyle); marker.setVisible(isVisible); return marker; } else if (geometryType.equals("LineString")) { Polyline polyline = addLineStringToMap((KmlLineString) geometry, style, inlineStyle); polyline.setVisible(isVisible); return polyline; } else if (geometryType.equals("Polygon")) { Polygon polygon = addPolygonToMap((KmlPolygon) geometry, style, inlineStyle); polygon.setVisible(isVisible); return polygon; } else if (geometryType.equals("MultiGeometry")) { return addMultiGeometryToMap(placemark, (KmlMultiGeometry) geometry, style, inlineStyle, isVisible); } return null; }
public void createAllMarkersInvisible() { LatLng northPoleHideout = new LatLng(90.0D, 0.0D); destMarker = map.addMarker(new MarkerOptions().position(northPoleHideout).icon(BitmapDescriptorFactory.fromBitmap(drawableDest))); destMarker.setVisible(false); currentPosition = map.addMarker(new MarkerOptions().position(northPoleHideout) .icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_maps_indicator_current_position_ohne)).anchor(0.5f, 0.5f)); currentPosition.setVisible(false); current_position_anim_ohne = map.addMarker(new MarkerOptions().position(northPoleHideout) .icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_maps_indicator_current_position_anim_ohne)).anchor(0.5f, 0.5f)); current_position_anim_ohne.setVisible(false); }
oldZoomLevel = zoomLevel; brightPoint = false; actualMarker[0].setVisible(false); currentPosition.setPosition(newPos); currentPosition.setVisible(true); actualMarker[0] = currentPosition; stepCounterOld = Core.stepCounter; actualMarker[0].setVisible(false); currentPosition.setVisible(true); actualMarker[0] = currentPosition; brightPoint = false; } else { current_position_anim_ohne.setPosition(newPos); current_position_anim_ohne.setVisible(true); actualMarker[0] = current_position_anim_ohne; brightPoint = true;
.anchor(resizeDrawableAnchorU, resizeDrawableAnchorV) .draggable(isEnabled)); radiusMarker.setVisible(isEnabled);
marker.setVisible(false);
@Test public void testDelegateMethods() throws Exception { // Given Marker marker = mock(Marker.class); BitmapDescriptor descriptor = mock(BitmapDescriptor.class); BitmapDescriptorAdapter adapter = new BitmapDescriptorAdapter(descriptor); MarkerAdapter markerAdapter = new MarkerAdapter(marker); // When markerAdapter.setVisible(true); markerAdapter.setIcon(adapter); markerAdapter.getPosition(); markerAdapter.showInfoWindow(); markerAdapter.remove(); // Then verify(marker).setVisible(eq(true)); verify(marker).setIcon(refEq(descriptor)); verify(marker).getPosition(); verify(marker).showInfoWindow(); verify(marker).remove(); }
public void setFirstPosition() { startLatLng = new LatLng(Core.startLat, Core.startLon); currentPosition.setPosition(startLatLng); currentPosition.setVisible(true); actualMarker[0] = currentPosition;