Skip to content
import LineSymbolMarker from "@arcgis/core/symbols/LineSymbolMarker.js";
Inheritance:
LineSymbolMarkerAccessor
Since
ArcGIS Maps SDK for JavaScript 4.16

LineSymbolMarker is used for rendering a simple marker graphic on a SimpleLineSymbol. Markers can enhance the cartographic information of a line by providing additional visual cues about the associated feature.

If you are in a 3D SceneView use a LineSymbol3DLayer which has support for LineStyleMarker3D.

See also
Example
const lineSymbol = new SimpleLineSymbol({
color: "gray",
width: 1.5,
// Define a blue "x" marker at the beginning of the line
marker: { // autocasts from LineSymbolMarker
style: "x",
color: "blue",
placement: "begin"
}
});

Constructors

Constructor

Constructor
Parameters
ParameterTypeDescriptionRequired
properties
See the properties table for a list of all the properties that may be passed into the constructor.
Example
const lineSymbolMarker = new LineSymbolMarker({
color: "blue",
placement: "begin-end",
style: "arrow"
});

Properties

Any properties can be set, retrieved or listened to. See the Watch for changes topic.
PropertyTypeClass
declaredClass
readonly inherited
type
readonly
"line-marker"

color

autocast Property
Type
Color

The color of the marker. If not specified, the marker will match the color of the line.

declaredClass

readonlyinherited Property
Type
string
Inherited from: Accessor

The name of the class. The declared class name is formatted as esri.folder.className.

placement

Property
Type
LineMarkerPlacement

The placement of the marker(s) on the line. Possible values are listed in the table below.

ValueDescription
beginSingle marker at the start of the line
endSingle marker at the end of the line
begin-endTwo markers, one at the start and one at the end of the line
Default value
"begin-end"

style

Property
Type
LineMarkerStyle

The marker style. Possible values are listed in the table below.

ValueExample
arrowlsm-arrow
circlelsm-circle
squarelsm-square
diamondlsm-diamond
crosslsm-cross
xlsm-x
Default value
"arrow"

type

readonly Property
Type
"line-marker"

The symbol type.

Methods

MethodSignatureClass
fromJSON
inherited static
fromJSON(json: any): any
toJSON
inherited
toJSON(): any

fromJSON

inheritedstatic Method
Signature
fromJSON (json: any): any
Inherited from: JSONSupportMixin

Creates a new instance of this class and initializes it with values from a JSON object generated from an ArcGIS product. The object passed into the input json parameter often comes from a response to a query operation in the REST API or a toJSON() method from another ArcGIS product. See the Using fromJSON() topic in the Guide for details and examples of when and how to use this function.

Parameters
ParameterTypeDescriptionRequired
json
any

A JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects.

Returns
any

Returns a new instance of this class.

toJSON

inherited Method
Signature
toJSON (): any
Inherited from: JSONSupportMixin

Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() guide topic for more information.

Returns
any

The ArcGIS portal JSON representation of an instance of this class.