/** * Remove a specified feature from the map * * @param feature feature to be removed */ protected void removeFeature(Feature feature) { mRenderer.removeFeature(feature); }
/** * Removes a GeoJsonFeature from the map if its geometry property is not null * * @param feature feature to remove from map */ public void removeFeature(GeoJsonFeature feature) { // Check if given feature is stored super.removeFeature(feature); if (super.getFeatures().contains(feature)) { feature.deleteObserver(this); } }
public void testRemoveFeature() throws Exception { Point p = new Point(new LatLng(40, 50)); Feature feature1 = new Feature(p, null, null); mRenderer.addFeature(feature1); mRenderer.removeFeature(feature1); assertFalse(mRenderer.getFeatures().contains(feature1)); }