ArrowLineLayer extends KujakuLayer { public LineLayer getLineLayer() { return lineLayer; } private  ArrowLineLayer(@NonNull Builder builder); LineLayer getLineLayer(); SymbolLayer getArrowHeadLayer(); @Override void addLayerToMap(@NonNull MapboxMap mapboxMap); @Override void enableLayerOnMap(@NonNull MapboxMap mapboxMap); @Override void disableLayerOnMap(@NonNull MapboxMap mapboxMap); @Override @NonNull String[] getLayerIds(); @Override boolean removeLayerOnMap(@NonNull MapboxMap mapboxMap); @Override void updateFeatures(@NonNull FeatureCollection featureCollection); static Point getCenter(@NonNull Geometry featureGeometry); @Override FeatureCollection getFeatureCollection(); static final String ARROW_HEAD_BEARING; static final int MIN_ARROW_ZOOM; static final int MAX_ARROW_ZOOM; static final float MIN_ZOOM_ARROW_HEAD_SCALE; static final float MAX_ZOOM_ARROW_HEAD_SCALE; }
@Test public void setLayerPropertiesFromBuilder() throws InvalidArrowLineConfigException { ArrayList<Feature> featuresList = new ArrayList<>(); FeatureCollection featureCollection = FeatureCollection.fromFeatures(featuresList); ArrowLineLayer.FeatureConfig featureConfig = new ArrowLineLayer.FeatureConfig(featureCollection); ArrowLineLayer.SortConfig sortConfig = new ArrowLineLayer.SortConfig("", ArrowLineLayer.SortConfig.SortOrder.DESC, ArrowLineLayer.SortConfig.PropertyType.NUMBER); ArrowLineLayer.Builder builder = new ArrowLineLayer.Builder(context, featureConfig, sortConfig); int colorRes = android.support.v7.appcompat.R.color.abc_btn_colored_text_material; int colorInt = context .getResources() .getColor(android.support.v7.appcompat.R.color.abc_btn_colored_text_material); float lineWidth = 67f; builder.setArrowLineColor(colorRes); builder.setArrowLineWidth(lineWidth); ArrowLineLayer arrowLineLayer = builder.build(); ReflectionHelpers.callInstanceMethod(arrowLineLayer, "createArrowLineLayer", ReflectionHelpers.ClassParameter.from(ArrowLineLayer.Builder.class, builder)); LineLayer lineLayer = arrowLineLayer.getLineLayer(); ShadowLayer shadowLayer = (ShadowLineLayer) Shadow.extract(lineLayer); HashMap<String, PropertyValue> propertyValues = shadowLayer.getPropertyValues(); assertEquals(propertyValues.get("line-color").value, ColorUtils.colorToRgbaString(colorInt)); assertEquals(propertyValues.get("line-width").value, lineWidth); }