@Test public void stopDrawing() { List<Point> points = new ArrayList<>(); points.add(Point.fromLngLat(1,1)); points.add(Point.fromLngLat(2,2)); points.add(Point.fromLngLat(3,3)); points.add(Point.fromLngLat(4,4)); manager.startDrawingPoints(points); Assert.assertTrue(manager.isDrawingEnabled()); Assert.assertNull(manager.getCurrentKujakuCircle()); Polygon polygon = manager.stopDrawingAndDisplayLayer(); Assert.assertFalse(manager.isDrawingEnabled()); Assert.assertNull(manager.getCurrentKujakuCircle()); Assert.assertNotNull(polygon); Assert.assertEquals(polygon.coordinates().get(0).size(), points.size()); }
private Polygon stopDrawing() { setDrawing(false); setCurrentCircle(null); Polygon polygon = getCurrentPolygon(); this.deleteAll(); this.refresh(false); return polygon; }
DrawingManager { private Polygon stopDrawing() { setDrawing(false); setCurrentCircle(null); Polygon polygon = getCurrentPolygon(); this.deleteAll(); this.refresh(false); return polygon; } }
DrawingManager { private Polygon stopDrawing() { setDrawing(false); setCurrentCircle(null); Polygon polygon = getCurrentPolygon(); this.deleteAll(); this.refresh(false); return polygon; } DrawingManager(@NonNull KujakuMapView mapView, @NonNull MapboxMap mapboxMap, @NonNull Style style); }
DrawingManager { private Polygon stopDrawing() { setDrawing(false); setCurrentCircle(null); Polygon polygon = getCurrentPolygon(); this.deleteAll(); this.refresh(false); return polygon; } DrawingManager(@NonNull KujakuMapView mapView, @NonNull MapboxMap mapboxMap, @NonNull Style style); static KujakuCircleOptions getKujakuCircleOptions(); static KujakuCircleOptions getKujakuCircleMiddleOptions(); static KujakuCircleOptions getKujakuCircleDraggableOptions(); boolean startDrawing(@Nullable FillBoundaryLayer fillBoundaryLayer); boolean editBoundary(@NonNull FillBoundaryLayer fillBoundaryLayer); void startDrawingPoints(@Nullable List<Point> points); Polygon stopDrawingAndDisplayLayer(); Polygon getCurrentPolygon(); boolean isDrawingEnabled(); Circle drawCircle(@NonNull LatLng latLng); Circle create(@NonNull KujakuCircleOptions options); void clearDrawing(); void delete(@Nullable KujakuCircle kujakuCircle); void deleteDrawingCurrentCircle(); void setDraggable(boolean draggable, @NonNull Circle circle); void unsetCurrentCircleDraggable(); boolean isMiddleCircle(@NonNull Circle circle); List<KujakuCircle> getKujakuCircles(); KujakuCircle getCurrentKujakuCircle(); void addOnDrawingCircleClickListener(OnDrawingCircleClickListener listener); void addOnKujakuLayerLongClickListener(OnKujakuLayerLongClickListener listener); }
DrawingManager { private Polygon stopDrawing() { setDrawing(false); setCurrentCircle(null); Polygon polygon = getCurrentPolygon(); this.deleteAll(); this.refresh(false); return polygon; } DrawingManager(@NonNull KujakuMapView mapView, @NonNull MapboxMap mapboxMap, @NonNull Style style); static KujakuCircleOptions getKujakuCircleOptions(); static KujakuCircleOptions getKujakuCircleMiddleOptions(); static KujakuCircleOptions getKujakuCircleDraggableOptions(); boolean startDrawing(@Nullable FillBoundaryLayer fillBoundaryLayer); boolean editBoundary(@NonNull FillBoundaryLayer fillBoundaryLayer); void startDrawingPoints(@Nullable List<Point> points); Polygon stopDrawingAndDisplayLayer(); Polygon getCurrentPolygon(); boolean isDrawingEnabled(); Circle drawCircle(@NonNull LatLng latLng); Circle create(@NonNull KujakuCircleOptions options); void clearDrawing(); void delete(@Nullable KujakuCircle kujakuCircle); void deleteDrawingCurrentCircle(); void setDraggable(boolean draggable, @NonNull Circle circle); void unsetCurrentCircleDraggable(); boolean isMiddleCircle(@NonNull Circle circle); List<KujakuCircle> getKujakuCircles(); KujakuCircle getCurrentKujakuCircle(); void addOnDrawingCircleClickListener(OnDrawingCircleClickListener listener); void addOnKujakuLayerLongClickListener(OnKujakuLayerLongClickListener listener);  }