AGSSimpleLineSymbol Class Reference


Description

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

Defined in:
AGSSimpleLineSymbol.h ( ArcGIS library)
Since:
1.0
Inheritance diagram for AGSSimpleLineSymbol:
AGSSymbol <AGSCoding>

List of all members.

Public Member Functions

(void) - decodeWithJSON:
(void) - drawGraphic:inContext:forEnvelope:atResolution:
(NSDictionary *) - encodeToJSON
(BOOL) - hitTestGraphic:withEnvelope:atResolution:
(id) - initWithColor:
(id) - initWithColor:width:
(id) - initWithJSON:
(BOOL) - shouldDrawGraphic:forEnvelope:atResolution:
(UIImage *) - swatchForGeometryType:size:

Static Public Member Functions

(id) + simpleLineSymbol
(AGSSimpleLineSymbol *) + simpleLineSymbolWithColor:
(AGSSimpleLineSymbol *) + simpleLineSymbolWithColor:width:
(CGPoint) + toScreenPointWithX:y:envelope:resolution:

Properties

UIColor * color
CGLineCap lineCap
CGLineJoin lineJoin
BOOL readyToDraw
AGSSimpleLineSymbolStyle style
CGFloat width

Member Function Documentation

- (void) decodeWithJSON: (NSDictionary *)  json   [optional, inherited]

Decode object from JSON representation.

Parameters:
json The JSON representation of the object to be decoded.
Since:
1.0
- (void) drawGraphic: (AGSGraphic *)  graphic
inContext: (CGContextRef)  context
forEnvelope: (AGSEnvelope *)  env
atResolution: (double)  resolution 

Method called by AGSGraphicsLayer to draw geometry onto context.

Since:
1.8
- (NSDictionary *) encodeToJSON   [optional, inherited]

Encode and return JSON representation for object.

Returns:
JSON representation of object.
Since:
1.0
- (BOOL) hitTestGraphic: (AGSGraphic *)  graphic
withEnvelope: (AGSEnvelope *)  envelope
atResolution: (double)  resolution 

Called to see if the geometry passes a hit test for this symbol.

Since:
1.8
- (id) initWithColor: (UIColor *)  color  
Since:
1.8
- (id) initWithColor: (UIColor *)  color
width: (CGFloat)  width 
Since:
1.8
- (id) initWithJSON: (NSDictionary *)  json   [optional, inherited]

Initialize and return object from JSON representation.

Parameters:
json The JSON representation of the object to be created.
Returns:
Object decoded from JSON representation.
Since:
1.0

Reimplemented in AGSWebMapFeatureCollection.

- (BOOL) shouldDrawGraphic: (AGSGraphic *)  graphic
forEnvelope: (AGSEnvelope *)  envelope
atResolution: (double)  resolution 

Called to see if the symbol should draw for a specific envelope.

Since:
1.8
+ (id) simpleLineSymbol  

Initialize autoreleased symbol with defaults.

Returns:
A new, autoreleased, simple line symbol object.
Since:
1.0
+ (AGSSimpleLineSymbol*) simpleLineSymbolWithColor: (UIColor *)  color  

Initialize autoreleased symbol with specified properties.

Parameters:
color A color for the line
Returns:
A new, autoreleased, simple line symbol object.
Since:
1.8
+ (AGSSimpleLineSymbol*) simpleLineSymbolWithColor: (UIColor *)  color
width: (CGFloat)  width 

Initialize autoreleased symbol with specified properties.

Parameters:
color A color for the line
width The width of the line
Returns:
A new, autoreleased, simple line symbol object.
Since:
1.8
- (UIImage *) swatchForGeometryType: (AGSGeometryType geometryType
size: (CGSize)  size 

Returns an image that represents a swatch for a particular geometry type.

Parameters:
geometryType The type of the geometry determines what kind of swatch is drawn.
size Size of the output swatch.
Returns:
UIImage of the drawn swatch.
+ (CGPoint) toScreenPointWithX: (double)  x
y: (double)  y
envelope: (AGSEnvelope *)  env
resolution: (double)  res 

A method that derived classes can call to help during drawing.

Since:
2.2

Property Documentation

- (UIColor*) color [read, write, retain, inherited]

Symbol color.

Since:
1.0
- (CGLineCap) lineCap [read, write, assign]

Specifies the line cap.

Since:
2.2
- (CGLineJoin) lineJoin [read, write, assign]

Specifies the line join.

Since:
2.2
- (BOOL) readyToDraw [read, write, assign, inherited]

Property called by the framework. Most symbols should have this set to YES as soon as the symbol is init'ed. If a symbol needs to access a resource asynchronously before it's ready to draw then it should be set to NO initially then YES once it is ready. This is not as efficient as if a symbol is readyToDraw to begin with, however, so custom symbols should only set this to NO initially if absolutely necessary.

- (AGSSimpleLineSymbolStyle) style [read, write, assign]

The line style. Possible values include

  • AGSSimpleLineSymbolStyleDash
  • AGSSimpleLineSymbolStyleDot
  • AGSSimpleLineSymbolStyleDashDot
  • AGSSimpleLineSymbolStyleDashDotDot
  • AGSSimpleLineSymbolStyleInsideFrame
  • AGSSimpleLineSymbolStyleNull
  • AGSSimpleLineSymbolStyleSolid

Default is AGSSimpleLineSymbolStyleSolid.

Since:
1.0
- (CGFloat) width [read, write, assign]

Width of line symbol in pixels. Default is 1.0.

Since:
1.0