- All Implemented Interfaces:
JsonSerializable
Symbol
to draw all features and graphics.
Properties of a SimpleRenderer:
- Symbol, the Symbol that is used to draw Features/Graphics to a GeoView.
- Description, gives detail information about what this Renderer's does.
- Label, name that this Renderer can be referred to.
Example of creating a SimpleRender:
// create a mapView ... // create a GraphicsOverlay and set it to the mapView GraphicsOverlay graphicsOverlay = new GraphicsOverlay(); mapView.getGraphicsOverlays().add(graphicsOverlay); SimpleMarkerSymbol symbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.Style.TRIANGLE, 0xffff0000, 5); SimpleRenderer simpleRenderer = new SimpleRenderer(symbol); graphicsOverlay.setRenderer(simpleRenderer); // the graphic's symbol should be that of the renderer that was assigned Point randomPoint = new Point(2000000, 2000000); Graphic graphic = new Graphic(randomPoint); graphicsOverlay.getGraphics().add(graphic);
- Since:
- 100.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from class com.esri.arcgisruntime.symbology.Renderer
Renderer.SceneProperties
-
Constructor Summary
ConstructorDescriptionCreates a new simple renderer without a Symbol.SimpleRenderer
(Symbol symbol) Creates a new simple renderer with the given symbol. -
Method Summary
Modifier and TypeMethodDescriptionGets the description that describes what this Renderer's does.getLabel()
Gets the name of this Renderer.Gets the Symbol that is being used by this Renderer to draw Features/Graphics to the GeoView.Returns the symbol that is used to visualize the given feature.Returns the symbol that is used to visualize the given graphic.void
setDescription
(String description) Sets the description, which gives detail information about what this Renderer's does.void
Sets a name that this Renderer can be referred to.void
Sets the Symbol to be used by this Renderer to draw Features/Graphics to the GeoView.Methods inherited from class com.esri.arcgisruntime.symbology.Renderer
fromJson, getRotationExpression, getRotationType, getSceneProperties, getSymbol, getSymbol, getSymbol, getSymbol, getSymbol, getSymbol, getUnknownJson, getUnsupportedJson, setRotationExpression, setRotationType, toJson
-
Constructor Details
-
SimpleRenderer
public SimpleRenderer()Creates a new simple renderer without a Symbol.- Since:
- 100.0.0
-
SimpleRenderer
Creates a new simple renderer with the given symbol.Setting the Symbol to null will just apply a default red circle Symbol.
- Parameters:
symbol
- the Symbol for this Renderer, can be null- Since:
- 100.0.0
-
-
Method Details
-
getSymbol
Returns the symbol that is used to visualize the given feature.If the renderer is a
DictionaryRenderer
and its associatedDictionarySymbolStyle
references a style file hosted on ArcGIS Online or an ArcGIS Enterprise portal (also referred to as a web style), this method returns null. If the layer has rendered and the symbol is already drawn on the view, this method returns a validMultilayerSymbol
. If you want to get the symbol before the layer is rendered, useDictionarySymbolStyle.getSymbolAsync(Map)
.- Specified by:
getSymbol
in classRenderer
- Parameters:
feature
- the Feature to get a Symbol from, not null- Returns:
- the Symbol of the Feature that was passed
- Throws:
IllegalArgumentException
- if feature is null- Since:
- 100.0.0
- See Also:
-
getSymbol
Returns the symbol that is used to visualize the given graphic.If the renderer is a
DictionaryRenderer
and its associatedDictionarySymbolStyle
references a style file hosted on ArcGIS Online or an ArcGIS Enterprise portal (also referred to as a web style), this method returns null. If the layer has rendered and the symbol is already drawn on the view, this method returns a validMultilayerSymbol
. If you want to get the symbol before the layer is rendered, useDictionarySymbolStyle.getSymbolAsync(Map)
.- Specified by:
getSymbol
in classRenderer
- Parameters:
graphic
- the Graphic to get a Symbol from, not null- Returns:
- the Symbol of the Graphic that was passed
- Throws:
IllegalArgumentException
- if graphic is null- Since:
- 100.0.0
- See Also:
-
getSymbol
Gets the Symbol that is being used by this Renderer to draw Features/Graphics to the GeoView.Default value is a red circle Symbol.
- Returns:
- the Symbol being used by this Renderer
- Since:
- 100.0.0
- See Also:
-
setSymbol
Sets the Symbol to be used by this Renderer to draw Features/Graphics to the GeoView.Setting the Symbol to null will just apply a default red circle Symbol.
- Parameters:
symbol
- the new Symbol used by this Renderer, can be null- Since:
- 100.0.0
-
getDescription
Gets the description that describes what this Renderer's does.Default value an empty string.
- Returns:
- the description of this Renderer
- Since:
- 100.0.0
-
setDescription
Sets the description, which gives detail information about what this Renderer's does. An example could be describing the meaning behind the Symbol it uses.- Parameters:
description
- the new description for this Renderer
-
getLabel
Gets the name of this Renderer.Default value is an empty string.
- Returns:
- the label of this Renderer
- Since:
- 100.0.0
-
setLabel
Sets a name that this Renderer can be referred to.- Parameters:
label
- the new label for this Renderer- Since:
- 100.0.0
-