ArcGIS Runtime SDK for iOS: AGSSimpleLineSymbol Class Reference
ArcGIS Runtime SDK for iOS  100.5
AGSSimpleLineSymbol Class Reference

Description

Instances of this class represent simple line symbols. Symbols describe how graphics and features look on a map. Different symbols are used with different geometry types. Line symbols are used to display graphics and features which are based on polyline geometries. Simple line symbols display predefined line style patterns such as solid, dash, dot, etc.

Since
100
Inheritance diagram for AGSSimpleLineSymbol:
AGSLineSymbol AGSSymbol AGSObject <AGSJSONSerializable>

Instance Methods

(id< AGSCancelable >) - createSwatchWithBackgroundColor:screen:completion:
 
(id< AGSCancelable >) - createSwatchWithCompletion:
 
(id< AGSCancelable >) - createSwatchWithGeometry:width:height:screen:backgroundColor:completion:
 
(nullable id< AGSCancelable >) - createSwatchWithWidth:height:screen:backgroundColor:completion:
 
(instancetype) - initWithStyle:color:width:
 
(instancetype) - initWithStyle:color:width:markerStyle:markerPlacement:
 
(BOOL) - isEqualToSymbol:
 
(nullable id) - toJSON:
 
(AGSMultilayerPolylineSymbol *) - toMultilayerSymbol
 

Class Methods

(nullable id< AGSJSONSerializable >) + fromJSON:error:
 
(instancetype) + simpleLineSymbolWithStyle:color:width:
 
(instancetype) + simpleLineSymbolWithStyle:color:width:markerStyle:markerPlacement:
 

Properties

BOOL antialias
 
AGSColorcolor
 
AGSSimpleLineSymbolMarkerPlacement markerPlacement
 
AGSSimpleLineSymbolMarkerStyle markerStyle
 
AGSSimpleLineSymbolStyle style
 
NSDictionary< NSString *, id > * unknownJSON
 
NSDictionary< NSString *, id > * unsupportedJSON
 
CGFloat width
 

Method Documentation

§ createSwatchWithBackgroundColor:screen:completion:()

- (id<AGSCancelable>) createSwatchWithBackgroundColor: (nullable AGSColor *)  backgroundColor
screen: (nullable UIScreen *)  screen
completion: (void(^)(AGSImage *__nullable swatch, NSError *__nullable error))  completion 

Creates swatch with provided background color.

Parameters
backgroundColorDesired background color of the image
screenScreen that the swatch will be rendered for. If you specify nil then the main screen will be used.
completionblock that is invoked when operation completes.
Since
100

§ createSwatchWithCompletion:()

- (id<AGSCancelable>) createSwatchWithCompletion: (void(^)(AGSImage *__nullable swatch, NSError *__nullable error))  completion

Creates swatch with provided background color. This method uses main screen's scale to determine the size of the image.

Parameters
completionblock that is invoked when operation completes.
Since
100

§ createSwatchWithGeometry:width:height:screen:backgroundColor:completion:()

- (id<AGSCancelable>) createSwatchWithGeometry: (AGSGeometry *)  geometry
width: (NSInteger)  width
height: (NSInteger)  height
screen: (nullable UIScreen *)  screen
backgroundColor: (nullable AGSColor *)  backgroundColor
completion: (void(^)(AGSImage *__nullable swatch, NSError *__nullable error))  completion 

Creates swatch using provided geometry and other parameters. This is the most configurable of the methods to create swatches. You can pass the pixels per inch that you would like the image to be rendered at. This will determine how many pixels are used to render symbols of sizes that are specified in Points.

Parameters
geometryGeometry of the symbol to be drawn in the swatch image. The coordinates of the specified geometry are in pixels, with the point (0,0) located at the centerpoint of the swatch image. The x-axis increases towards the right-hand side of the swatch image. The y-axis increases towards the top of the swatch image. For example: when creating a swatch for a AGSSimpleMarkerSymbol, specifying a geometry of (10,10) will draw the marker 10 pixels up and to the right of the center of the swatch. The geometry (AGSPoint, AGSPolyline, AGSPolygon) correspond to the symbol (AGSSimpleMarkerSymbol, AGSSimpleLineSymbol, AGSSimpleFillSymbol). The geometry's spatial reference is ignored.
widthDesired width of the image in pixels
heightDesired height of the image in pixels
screenScreen that the swatch will be rendered for. If you specify nil then the main screen will be used.
backgroundColorDesired background color of the image
completionblock that is invoked when operation completes.
Since
100

§ createSwatchWithWidth:height:screen:backgroundColor:completion:()

- (nullable id<AGSCancelable>) createSwatchWithWidth: (NSInteger)  width
height: (NSInteger)  height
screen: (nullable UIScreen *)  screen
backgroundColor: (nullable AGSColor *)  backgroundColor
completion: (void(^)(AGSImage *__nullable swatch, NSError *__nullable error))  completion 

§ fromJSON:error:()

+ (nullable id<AGSJSONSerializable>) fromJSON: (id)  JSONObject
error: (NSError **)  error 
staticrequiredinherited

Initializes and returns an object from its JSON representation.

Parameters
JSONObjectNSDictionary or NSArray containing the JSON.
errorencountered during the operation, if any.
Since
100

§ initWithStyle:color:width:()

- (instancetype) initWithStyle: (AGSSimpleLineSymbolStyle style
color: (AGSColor *)  color
width: (CGFloat)  width 

Initialize a simple line symbol with the provided parameters

Parameters
styleof the line
colorof the line
widthof the line in points (not pixels)
Returns
Initialized simple line symbol
Since
100

§ initWithStyle:color:width:markerStyle:markerPlacement:()

- (instancetype) initWithStyle: (AGSSimpleLineSymbolStyle style
color: (AGSColor *)  color
width: (CGFloat)  width
markerStyle: (AGSSimpleLineSymbolMarkerStyle markerStyle
markerPlacement: (AGSSimpleLineSymbolMarkerPlacement markerPlacement 

Initialize a simple line symbol with the provided parameters

Parameters
styleof the line
colorof the line
widthof the line in points (not pixels)
markerStylespecifying the type of markers for the line
markerPlacementspecifying the placement of markers for the line endings
Returns
Initialized simple line symbol
Since
100.2

§ isEqualToSymbol:()

- (BOOL) isEqualToSymbol: (AGSSymbol *)  other

Compares this symbol to another for equality

Parameters
othersymbol to compare this one to
Returns
whether the two symbols are equal or not
Since
100

§ simpleLineSymbolWithStyle:color:width:()

+ (instancetype) simpleLineSymbolWithStyle: (AGSSimpleLineSymbolStyle style
color: (AGSColor *)  color
width: (CGFloat)  width 

Initialize a simple line symbol with the provided parameters

Parameters
styleof the line
colorof the line
widthof the line in points (not pixels)
Returns
Initialized simple line symbol
Since
100

§ simpleLineSymbolWithStyle:color:width:markerStyle:markerPlacement:()

+ (instancetype) simpleLineSymbolWithStyle: (AGSSimpleLineSymbolStyle style
color: (AGSColor *)  color
width: (CGFloat)  width
markerStyle: (AGSSimpleLineSymbolMarkerStyle markerStyle
markerPlacement: (AGSSimpleLineSymbolMarkerPlacement markerPlacement 

Initialize a simple line symbol with the provided parameters

Parameters
styleof the line
colorof the line
widthof the line in points (not pixels)
markerStylespecifying the type of markers for the line endings
markerPlacementspecifying the placement of markers for the line endings
Returns
Initialized simple line symbol
Since
100.2

§ toJSON:()

- (nullable id) toJSON: (NSError **)  error
requiredinherited

Returns JSON representation for this object.

Parameters
errorencountered during the operation, if any.
Returns
NSDictionary or NSArray containing the JSON.
Since
100

Reimplemented in AGSPortalItem.

§ toMultilayerSymbol()

- (AGSMultilayerPolylineSymbol *) toMultilayerSymbol

Returns the multilayer polyline symbol generated from simple line symbol. The resulting symbol contains a single AGSSolidStrokeSymbolLayer to represent the line symbol. An effect is applied to the symbol if a dash pattern is used.

Returns
Multilayer polyline symbol
Since
100.5

Property Documentation

§ antialias

- (BOOL) antialias
readwritenonatomicassigninherited

Whether the line should be anti-aliased. Defaults to true.

Since
100

§ color

- (AGSColor*) color
readwritenonatomicstronginherited

Color of the line

Since
100

§ markerPlacement

- (AGSSimpleLineSymbolMarkerPlacement) markerPlacement
readwritenonatomicassign

The placement of markers on the line endings

Since
100.2

§ markerStyle

- (AGSSimpleLineSymbolMarkerStyle) markerStyle
readwritenonatomicassign

The style of markers on the line endings

Since
100.2

§ style

- (AGSSimpleLineSymbolStyle) style
readwritenonatomicassign

The line style

Since
100

§ unknownJSON

- (NSDictionary<NSString*,id>*) unknownJSON
readrequirednonatomiccopyinherited

A dictionary of values that was in the source JSON but was unparsed by API.

Returns
NSDictionary containing the unknown JSON.
Since
100

§ unsupportedJSON

- (NSDictionary<NSString*,id>*) unsupportedJSON
readnonatomiccopyinherited

A dictionary of values that are supported by the REST API, but not exposed through the SDK API.

Returns
NSDictionary containing the unsupported JSON.
Since
100

§ width

- (CGFloat) width
readwritenonatomicassigninherited

Width of the line, in points (not pixels)

Since
100