-
public class SimpleFastPointOverlayOptionsOptions for SimpleFastPointOverlay. Created by Miguel Porto on 25-10-2016.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumSimpleFastPointOverlayOptions.RenderingAlgorithmpublic enumSimpleFastPointOverlayOptions.Shapepublic enumSimpleFastPointOverlayOptions.LabelPolicy
-
Constructor Summary
Constructors Constructor Description SimpleFastPointOverlayOptions()
-
Method Summary
-
-
Method Detail
-
getDefaultStyle
static SimpleFastPointOverlayOptions getDefaultStyle()
Creates a new SimpleFastPointOverlayOptions object with default options.
-
setPointStyle
SimpleFastPointOverlayOptions setPointStyle(Paint style)
Sets the style for the point overlay, which is applied to all circles.If the layer is individually styled, the individual style overrides this.
- Parameters:
style- A Paint object.
-
setSelectedPointStyle
SimpleFastPointOverlayOptions setSelectedPointStyle(Paint style)
Sets the style for the selected point.
- Parameters:
style- A Paint object.
-
setRadius
SimpleFastPointOverlayOptions setRadius(float radius)
Sets the radius of the circles to be drawn.
- Parameters:
radius- Radius.
-
setSelectedRadius
SimpleFastPointOverlayOptions setSelectedRadius(float radius)
Sets the radius of the selected point's circle.
- Parameters:
radius- Radius.
-
setIsClickable
SimpleFastPointOverlayOptions setIsClickable(boolean clickable)
Sets whether this overlay is clickable or not. A clickable overlay will automatically selectthe nearest point.
- Parameters:
clickable- True or false.
-
setCellSize
SimpleFastPointOverlayOptions setCellSize(int cellSize)
Sets the grid cell size used for indexing, in pixels. Larger cells result in faster renderingspeed, but worse fidelity. Default is 10 pixels, for large datasets (>10k points), use 15.
- Parameters:
cellSize- The cell size in pixels.
-
setAlgorithm
SimpleFastPointOverlayOptions setAlgorithm(SimpleFastPointOverlayOptions.RenderingAlgorithm algorithm)
Sets the rendering algorithm. There are three options:NO_OPTIMIZATION: Slowest option. Draw all points on each draw event.MEDIUM_OPTIMIZATION: Faster. Recalculates the grid index on each draw event.Not recommended for >10k points. Better UX, but may be choppier.MAXIMUM_OPTIMIZATION: Fastest. Only recalculates the grid on touch up and animation end, hence much faster display on move. Recommended for >10k points.
- Parameters:
algorithm- A RenderingAlgorithm.
-
setSymbol
SimpleFastPointOverlayOptions setSymbol(SimpleFastPointOverlayOptions.Shape symbol)
Sets the symbol shape for this layer. Hint: circle shape is less performant, avoid for large N.
- Parameters:
symbol- The symbol, currently CIRCLE or SQUARE.
-
setTextStyle
SimpleFastPointOverlayOptions setTextStyle(Paint textStyle)
Sets the style for the labels.If the layer is individually styled, the individual style overrides this.
- Parameters:
textStyle- The style.
-
setMinZoomShowLabels
SimpleFastPointOverlayOptions setMinZoomShowLabels(int minZoomShowLabels)
Sets the minimum zoom level at which the labels should be drawn. This option isignored if LabelPolicy is DENSITY_THRESHOLD.
- Parameters:
minZoomShowLabels- The zoom level.
-
setMaxNShownLabels
SimpleFastPointOverlayOptions setMaxNShownLabels(int maxNShownLabels)
Sets the threshold (nr. of visible points) after which labels will not be drawn. Thisoption only works when LabelPolicy is DENSITY_THRESHOLD and the algorithm isMAXIMUM_OPTIMIZATION.
- Parameters:
maxNShownLabels- The maximum number of visible points
-
setLabelPolicy
SimpleFastPointOverlayOptions setLabelPolicy(SimpleFastPointOverlayOptions.LabelPolicy labelPolicy)
Sets the policy for displaying point labels. Can be:ZOOM_THRESHOLD: Labels are not displayed is current map zoom level is lower than
MinZoomShowLabelsDENSITY_THRESHOLD: Labels are not displayed when the number of visible points is largerthanMaxNShownLabels. This only works for MAXIMUM_OPTIMIZATION- Parameters:
labelPolicy- One ofZOOM_THRESHOLDorDENSITY_THRESHOLD
-
getPointStyle
Paint getPointStyle()
-
getSelectedPointStyle
Paint getSelectedPointStyle()
-
getTextStyle
Paint getTextStyle()
-
getCircleRadius
float getCircleRadius()
-
getSelectedCircleRadius
float getSelectedCircleRadius()
-
isClickable
boolean isClickable()
-
getCellSize
int getCellSize()
-
getAlgorithm
SimpleFastPointOverlayOptions.RenderingAlgorithm getAlgorithm()
-
getSymbol
SimpleFastPointOverlayOptions.Shape getSymbol()
-
getLabelPolicy
SimpleFastPointOverlayOptions.LabelPolicy getLabelPolicy()
-
getMaxNShownLabels
int getMaxNShownLabels()
-
getMinZoomShowLabels
int getMinZoomShowLabels()
-
-
-
-