Package com.esri.arcgisruntime.symbology
Class SimpleMarkerSceneSymbol
- java.lang.Object
-
- com.esri.arcgisruntime.symbology.Symbol
-
- com.esri.arcgisruntime.symbology.SceneSymbol
-
- com.esri.arcgisruntime.symbology.MarkerSceneSymbol
-
- com.esri.arcgisruntime.symbology.SimpleMarkerSceneSymbol
-
- All Implemented Interfaces:
JsonSerializable
public final class SimpleMarkerSceneSymbol extends MarkerSceneSymbol
Used to draw point or multipoint features on a layer using a 3D marker symbol.Simple marker scene symbols display graphics using a 3D symbol. A SimpleMarkerSceneSymbol is a MarkerSceneSymbol that is based on simple shapes.
SimpleMarkerSceneSymbol symbolize Graphics and Features that have a Point or Multipoint geometry using simple predefined styles:
- Cube
- Cone
- Cylinder
- Diamond
- Sphere
- Tetrahedron
A SimpleMarkerSceneSymbol has the following properties:
- Style, type of shape.
- Width, width of the symbol.
- Height, height of the symbol.
- Depth, depth of the symbol.
- Pitch, pitch of the symbol.
- Roll, roll of the symbol.
- Heading, heading of the symbol.
- Anchor Position, placement of the symbol relative to the graphic/feature's geometry.
The shapes rendered are dependent on the style and dimensions (width, height, depth).
- If the style is sphere, and dimensions are different, then the shape rendered is an ellipsoid.
- If the style is cube, and dimensions are different, then the shape rendered is a cuboid.
- If the style is cone, and the width and depth are different, then the cone rendered has elliptic base.
- If the style is cylinder, and the width and depth are different, them the cylinder rendered has elliptic ends.
- If the style is diamond, and the width and depth are different, then the two halves of the diamond are connected by a rectangle (instead of the standard square).
- If the style is a tetrahedron, and the width and depth are different, then the base is not an equilateral triangle.
GraphicsOverlay.getGraphics().add(new Graphic(point, simpleMarkerSceneSymbol));
ORGraphicsOverlay.setRenderer(new SimpleRenderer(simpleMarkerSceneSymbol));
- Since:
- 100.0.0 for JavaSE and 100.1.0 for Android
- See Also:
Graphic
,GraphicsOverlay
,SimpleRenderer
,MarkerSceneSymbol
,Symbol
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SimpleMarkerSceneSymbol.Style
Defines the marker style for this SimpleMarkerSceneSymbol.-
Nested classes/interfaces inherited from class com.esri.arcgisruntime.symbology.SceneSymbol
SceneSymbol.AnchorPosition
-
-
Field Summary
-
Fields inherited from class com.esri.arcgisruntime.symbology.MarkerSceneSymbol
DEFAULT_ANCHOR_POSITION
-
-
Constructor Summary
Constructors Constructor Description SimpleMarkerSceneSymbol(SimpleMarkerSceneSymbol.Style style, int color, double width, double height, double depth, SceneSymbol.AnchorPosition anchorPosition)
Creates a new SimpleMarkerSceneSymbol.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SimpleMarkerSceneSymbol
createCone(int color, double diameter, double height)
Creates a cone with the given dimensions.static SimpleMarkerSceneSymbol
createCone(int color, double diameter, double height, SceneSymbol.AnchorPosition anchorPosition)
Creates a cone with the given dimensions.static SimpleMarkerSceneSymbol
createCube(int color, double size)
Creates a cube with the given dimensions.static SimpleMarkerSceneSymbol
createCube(int color, double size, SceneSymbol.AnchorPosition anchorPosition)
Creates a cube with the given dimensions.static SimpleMarkerSceneSymbol
createCylinder(int color, double diameter, double height)
Creates a cylinder with the given dimensions.static SimpleMarkerSceneSymbol
createCylinder(int color, double diameter, double height, SceneSymbol.AnchorPosition anchorPosition)
Creates a cylinder with the given dimensions.static SimpleMarkerSceneSymbol
createDiamond(int color, double size, double height)
Creates a diamond with the given dimensions.static SimpleMarkerSceneSymbol
createDiamond(int color, double size, double height, SceneSymbol.AnchorPosition anchorPosition)
Creates a diamond with the given dimensions.static SimpleMarkerSceneSymbol
createSphere(int color, double diameter)
Creates a sphere with the given dimensions.static SimpleMarkerSceneSymbol
createSphere(int color, double diameter, SceneSymbol.AnchorPosition anchorPosition)
Creates a sphere with the given dimensions.static SimpleMarkerSceneSymbol
createTetrahedron(int color, double size, double height)
Creates a tetrahedron with the given dimensions.static SimpleMarkerSceneSymbol
createTetrahedron(int color, double size, double height, SceneSymbol.AnchorPosition anchorPosition)
Creates a tetrahedron with the given dimensions.SimpleMarkerSceneSymbol.Style
getStyle()
Returns the style.void
setStyle(SimpleMarkerSceneSymbol.Style style)
Sets the style.-
Methods inherited from class com.esri.arcgisruntime.symbology.MarkerSceneSymbol
getAnchorPosition, getColor, getDepth, getHeading, getHeight, getPitch, getRoll, getWidth, setAnchorPosition, setColor, setDepth, setHeading, setHeight, setPitch, setRoll, setWidth
-
Methods inherited from class com.esri.arcgisruntime.symbology.Symbol
createSwatchAsync, createSwatchAsync, createSwatchAsync, createSwatchAsync, fromJson, getUnknownJson, getUnsupportedJson, toJson
-
-
-
-
Constructor Detail
-
SimpleMarkerSceneSymbol
public SimpleMarkerSceneSymbol(SimpleMarkerSceneSymbol.Style style, int color, double width, double height, double depth, SceneSymbol.AnchorPosition anchorPosition)
Creates a new SimpleMarkerSceneSymbol.- Parameters:
style
- the style of the symbolSimpleMarkerSceneSymbol.Style
color
- the color of the symbol colorwidth
- the width in meters of the symbolheight
- height in meters of the symboldepth
- depth in meters of the symbolanchorPosition
- anchor position of the symbol placementSceneSymbol.AnchorPosition
relative to the graphic/feature's geometry- Throws:
java.lang.IllegalArgumentException
- if style is nulljava.lang.IllegalArgumentException
- if anchorPosition is nulljava.lang.IllegalArgumentException
- if width or height or depth is less than 1- Since:
- 100.0.0 for JavaSE and 100.1.0 for Android
-
-
Method Detail
-
createCone
public static SimpleMarkerSceneSymbol createCone(int color, double diameter, double height)
Creates a cone with the given dimensions.Default properties:
- Anchor position, Bottom
- Pitch, 0.0
- Roll, 0.0
- Heading, 0.0
- Parameters:
color
- surface color of the symbol as a ARGB(alpha, red, green, blue) valuediameter
- diameter of the base of the cone, in metersheight
- height from the base to the tip of the code, in meters- Returns:
- a new cone
- Throws:
java.lang.IllegalArgumentException
- if diameter or height is less than 1- Since:
- 100.0.0 for JavaSE and 100.1.0 for Android
-
createCone
public static SimpleMarkerSceneSymbol createCone(int color, double diameter, double height, SceneSymbol.AnchorPosition anchorPosition)
Creates a cone with the given dimensions.Default properties:
- Pitch, 0.0
- Roll, 0.0
- Heading, 0.0
- Parameters:
color
- surface color of the symbol as a ARGB(alpha, red, green, blue) valuediameter
- diameter of the base of the cone, in metersheight
- height from the base to the tip of the code, in metersanchorPosition
- placement of the symbol relative to the graphic/feature's geometry- Returns:
- a new cone
- Throws:
java.lang.IllegalArgumentException
- if anchorPosition is nulljava.lang.IllegalArgumentException
- if diameter or height is less than 1- Since:
- 100.0.0 for JavaSE and 100.1.0 for Android
-
createCube
public static SimpleMarkerSceneSymbol createCube(int color, double size)
Creates a cube with the given dimensions.Default properties:
- Anchor position, Bottom
- Pitch, 0.0
- Roll, 0.0
- Heading, 0.0
- Parameters:
color
- surface color of the symbol as a ARGB(alpha, red, green, blue) valuesize
- specifies the width, height, and depth of cube, in meters- Returns:
- a new cube
- Throws:
java.lang.IllegalArgumentException
- if size is less than 1- Since:
- 100.0.0 for JavaSE and 100.1.0 for Android
-
createCube
public static SimpleMarkerSceneSymbol createCube(int color, double size, SceneSymbol.AnchorPosition anchorPosition)
Creates a cube with the given dimensions.Default properties:
- Pitch, 0.0
- Roll, 0.0
- Heading, 0.0
- Parameters:
color
- surface color of the symbol as a ARGB(alpha, red, green, blue) valuesize
- specifies the width, height, and depth of cube, in metersanchorPosition
- placement of the symbol relative to the graphic/feature's geometry- Returns:
- a new cube
- Throws:
java.lang.IllegalArgumentException
- if size is less than 1java.lang.IllegalArgumentException
- if anchorPosition is null- Since:
- 100.0.0 for JavaSE and 100.1.0 for Android
-
createCylinder
public static SimpleMarkerSceneSymbol createCylinder(int color, double diameter, double height)
Creates a cylinder with the given dimensions.Default properties:
- Anchor position, Bottom
- Pitch, 0.0
- Roll, 0.0
- Heading, 0.0
- Parameters:
color
- surface color of the symbol as a ARGB(alpha, red, green, blue) valuediameter
- diameter of the cylinder, represents the width and depth, in metersheight
- distance between the ends of the cylinder, in meters- Returns:
- a new cylinder
- Throws:
java.lang.IllegalArgumentException
- if diameter or height is less than 1- Since:
- 100.0.0 for JavaSE and 100.1.0 for Android
-
createCylinder
public static SimpleMarkerSceneSymbol createCylinder(int color, double diameter, double height, SceneSymbol.AnchorPosition anchorPosition)
Creates a cylinder with the given dimensions.Default properties:
- Pitch, 0.0
- Roll, 0.0
- Heading, 0.0
- Parameters:
color
- surface color of the symbol as a ARGB(alpha, red, green, blue) valuediameter
- diameter of the cylinder, represents the width and depth, in metersheight
- distance between the ends of the cylinder, in metersanchorPosition
- placement of the symbol relative to the graphic/feature's geometry- Returns:
- a new cylinder
- Throws:
java.lang.IllegalArgumentException
- if diameter or height is less than 1java.lang.IllegalArgumentException
- if anchorPosition is null- Since:
- 100.0.0 for JavaSE and 100.1.0 for Android
-
createDiamond
public static SimpleMarkerSceneSymbol createDiamond(int color, double size, double height)
Creates a diamond with the given dimensions.Default properties:
- Anchor position, Bottom
- Pitch, 0.0
- Roll, 0.0
- Heading, 0.0
- Parameters:
color
- surface color of the symbol as a ARGB(alpha, red, green, blue) valuesize
- represents the width and depth of the diamond, in metersheight
- distance from one tip to the other, in meters- Returns:
- a new diamond
- Throws:
java.lang.IllegalArgumentException
- if size or height is less than 1- Since:
- 100.0.0 for JavaSE and 100.1.0 for Android
-
createDiamond
public static SimpleMarkerSceneSymbol createDiamond(int color, double size, double height, SceneSymbol.AnchorPosition anchorPosition)
Creates a diamond with the given dimensions.Default properties:
- Pitch, 0.0
- Roll, 0.0
- Heading, 0.0
- Parameters:
color
- surface color of the symbol as a ARGB(alpha, red, green, blue) valuesize
- represents the width and depth of the diamond, in metersheight
- distance from one tip to the other, in metersanchorPosition
- placement of the symbol relative to the graphic/feature's geometry- Returns:
- a new diamond
- Throws:
java.lang.IllegalArgumentException
- if size or height is less than 1java.lang.IllegalArgumentException
- if anchorPosition is null- Since:
- 100.0.0 for JavaSE and 100.1.0 for Android
-
createSphere
public static SimpleMarkerSceneSymbol createSphere(int color, double diameter)
Creates a sphere with the given dimensions.Default properties:
- Pitch, 0.0
- Roll, 0.0
- Heading, 0.0
- Parameters:
color
- surface color of the symbol as a ARGB(alpha, red, green, blue) valuediameter
- diameter of the sphere, represents the height, width and depth, in meters- Returns:
- a new sphere
- Throws:
java.lang.IllegalArgumentException
- if diameter is less than 1- Since:
- 100.0.0 for JavaSE and 100.1.0 for Android
-
createSphere
public static SimpleMarkerSceneSymbol createSphere(int color, double diameter, SceneSymbol.AnchorPosition anchorPosition)
Creates a sphere with the given dimensions.Default properties:
- Pitch, 0.0
- Roll, 0.0
- Heading, 0.0
- Parameters:
color
- surface color of the symbol as a ARGB(alpha, red, green, blue) valuediameter
- diameter of the sphere, represents the height, width and depth, in metersanchorPosition
- placement of the symbol relative to the graphic/feature's geometry- Returns:
- a new sphere
- Throws:
java.lang.IllegalArgumentException
- if diameter is less than 1java.lang.IllegalArgumentException
- if anchorPosition is null- Since:
- 100.0.0 for JavaSE and 100.1.0 for Android
-
createTetrahedron
public static SimpleMarkerSceneSymbol createTetrahedron(int color, double size, double height)
Creates a tetrahedron with the given dimensions.Default properties:
- Pitch, 0.0
- Roll, 0.0
- Heading, 0.0
- Parameters:
color
- surface color of the symbol as a ARGB(alpha, red, green, blue) valuesize
- represents the width and depth of the tetrahedron, in metersheight
- height from center of the base to the opposite tip, in meters- Returns:
- a new tetrahedron
- Throws:
java.lang.IllegalArgumentException
- if size or height is less than 1- Since:
- 100.0.0 for JavaSE and 100.1.0 for Android
-
createTetrahedron
public static SimpleMarkerSceneSymbol createTetrahedron(int color, double size, double height, SceneSymbol.AnchorPosition anchorPosition)
Creates a tetrahedron with the given dimensions.Default properties:
- Pitch, 0.0
- Roll, 0.0
- Heading, 0.0
- Parameters:
color
- surface color of the symbol as a ARGB(alpha, red, green, blue) valuesize
- represents the width and depth of the tetrahedron, in metersheight
- height from center of the base to the opposite tip, in metersanchorPosition
- placement of the symbol relative to the graphic/feature's geometry- Returns:
- a new tetrahedron
- Throws:
java.lang.IllegalArgumentException
- if size or height is less than 1java.lang.IllegalArgumentException
- if anchorPosition is null- Since:
- 100.0.0 for JavaSE and 100.1.0 for Android
-
getStyle
public SimpleMarkerSceneSymbol.Style getStyle()
Returns the style. Default is BOTTOM.- Returns:
- the style
- Since:
- 100.0.0 for JavaSE and 100.1.0 for Android
-
setStyle
public void setStyle(SimpleMarkerSceneSymbol.Style style)
Sets the style.- Parameters:
style
- the style- Throws:
java.lang.IllegalArgumentException
- if style is null- Since:
- 100.0.0 for JavaSE and 100.1.0 for Android
-
-