@Override public <T> void removePolygon(AirMapPolygon<T> polygon) { Polygon nativePolygon = polygon.getGooglePolygon(); if (nativePolygon != null) { nativePolygon.remove(); } }
/** * Removes all given Features from the map and clears all stored features. * * @param features features to remove */ protected static void removeFeatures(HashMap<Feature, Object> features) { // Remove map object from the map for (Object mapObject : features.values()) { if (mapObject instanceof Marker) { ((Marker) mapObject).remove(); } else if (mapObject instanceof Polyline) { ((Polyline) mapObject).remove(); } else if (mapObject instanceof Polygon) { ((Polygon) mapObject).remove(); } } }
/** * Given a Marker, Polyline, Polygon or an array of these and removes it from the map * * @param mapObject map object or array of map objects to remove from the map */ public static void removeFromMap(Object mapObject) { if (mapObject instanceof Marker) { ((Marker) mapObject).remove(); } else if (mapObject instanceof Polyline) { ((Polyline) mapObject).remove(); } else if (mapObject instanceof Polygon) { ((Polygon) mapObject).remove(); } else if (mapObject instanceof ArrayList) { for (Object mapObjectElement : (ArrayList) mapObject) { removeFromMap(mapObjectElement); } } }
@Override public void remove() { polygon.remove(); }
@Override public void remove() { manager.onRemove(real); real.remove(); }
/** * Removes all given KML placemarks from the map and clears all stored placemarks. * * @param placemarks placemarks to remove */ private static void removePlacemarks(HashMap<KmlPlacemark, Object> placemarks) { // Remove map object from the map for (Object mapObject : placemarks.values()) { if (mapObject instanceof Marker) { ((Marker) mapObject).remove(); } else if (mapObject instanceof Polyline) { ((Polyline) mapObject).remove(); } else if (mapObject instanceof Polygon) { ((Polygon) mapObject).remove(); } } }
/** * Change the "type" of measuring: Distance, Area or Altitude * * @param newType the type to change to */ private void changeType(final MeasureType newType) { type = newType; drawerListAdapert.changeType(newType); updateValueText(); if (mDrawerLayout != null) mDrawerLayout.closeDrawers(); if (newType != MeasureType.AREA) { if (areaOverlay != null) areaOverlay.remove(); } }
/** * Given a Marker, Polyline, Polygon or an array of these and removes it from the map * * @param mapObject map object or array of map objects to remove from the map */ private static void removeFromMap(Object mapObject) { if (mapObject instanceof Marker) { ((Marker) mapObject).remove(); } else if (mapObject instanceof Polyline) { ((Polyline) mapObject).remove(); } else if (mapObject instanceof Polygon) { ((Polygon) mapObject).remove(); } else if (mapObject instanceof ArrayList) { for (Object mapObjectElement : (ArrayList) mapObject) { removeFromMap(mapObjectElement); } } }
elevationView.setVisibility(View.GONE); double area; if (areaOverlay != null) areaOverlay.remove(); if (trace.size() >= 3) { area = SphericalUtil.computeArea(trace);
@Test public void testDelegateMethods() throws Exception { // Given Polygon polygon = mock(Polygon.class); PolygonAdapter polygonAdapter = new PolygonAdapter(polygon); // When polygonAdapter.setVisible(true); polygonAdapter.setHoles(Collections.<List<LatLng>>emptyList()); polygonAdapter.getPoints(); polygonAdapter.remove(); // Then verify(polygon).setVisible(eq(true)); verify(polygon).setHoles(anyList()); verify(polygon).getPoints(); verify(polygon).remove(); }
private void drawPolygon(List<LatLng> latLngList) { if (polygon != null) { polygon.remove(); } PolygonOptions polygonOptions = new PolygonOptions(); polygonOptions.fillColor(drawingOption.getFillColor()); polygonOptions.strokeColor(drawingOption.getStrokeColor()); polygonOptions.strokeWidth(drawingOption.getStrokeWidth()); polygonOptions.addAll(latLngList); polygon = mMap.addPolygon(polygonOptions); }