Tutorial - Lines
Add a line feature to a geospatial context. Lines can vary many properties, including stroke width, color, opacity, and offset, line join and cap, and closure.
First, create a map and a feature layer.
Step 1
Active
Inactive
Specify some data. A line feature is an array of data elements, each of which has a list of vertices.
Step 2
Active
Inactive
Create the line feature and set some styles on it.
Step 3
Active
Inactive
Specify some more complex data. Our data elements are now objects with
various properties, which will require line
and position
functions
for the line feature to access.
Step 2-B
Active
Inactive
Create the line feature and specify functions to access the data and set styles. Our style functions are more complex, as they get information from the line data items.
Step 3-B
Active
Inactive