AGSSimpleMarkerSymbol Class Reference


Description

Instances of this class represent simple marker symbols. Symbols describe how graphics look on the map. Different symbols are used for graphics with different geometry types. Marker symbols are used to display those graphics which are based on point or multipoint geometry. Simple marker symbols display graphics using simple, predefined markers such as circle, cross, etc. In addition, the markers can have an optional outline, which is defined by a line symbol.

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

List of all members.

Public Member Functions

(void) - decodeWithJSON:
(NSDictionary *) - encodeToJSON
(id) - initWithColor:
(id) - initWithJSON:
(UIImage *) - swatchForGeometryType:size:

Static Public Member Functions

(id) + simpleMarkerSymbol
(id) + simpleMarkerSymbolWithColor:

Properties

CGFloat angle
UIColor * color
CGPoint hotspot
AGSSimpleLineSymboloutline
BOOL rotateAroundOffset
CGFloat size
AGSSimpleMarkerSymbolStyle style
CGFloat xoffset
CGFloat yoffset

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
- (NSDictionary *) encodeToJSON   [optional, inherited]

Encode and return JSON representation for object.

Returns:
JSON representation of object.
Since:
1.0
- (id) initWithColor: (UIColor*)  color  

Initializes with a color.

Parameters:
color The color to initialize the marker symbol with.
Since:
1.0
- (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
+ (id) simpleMarkerSymbol  

Get autoreleased symbol initialized with default values.

Returns:
A new, autoreleased, marker symbol object.
Since:
1.0
+ (id) simpleMarkerSymbolWithColor: (UIColor*)  color  

Get autoreleased simple marker symbol with a color.

Parameters:
color The color to initialize the marker symbol with.
Since:
1.0
- (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.

Property Documentation

- (CGFloat) angle [read, write, assign, inherited]

The rotation angle (in degrees) of the marker. The marker is rotated in a counter-clockwise direction by the amount specified.

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

Symbol color.

Since:
1.0
- (CGPoint) hotspot [read, write, assign, inherited]

The location in pixels that defines whether a user tapped on this symbol or not.

For example, consider an AGSPictureMarkerSymbol using the image of a pushpin. By default, the hotspot would be in the center of the image and so a tap would be registered only if a user tapped in the middle of the pushpin. To allow the user to tap on the head of the pin to show a callout, you would need to specify the corresponding location's hotspot. Furthermore, the callout’s leader will be anchored to this hotspot location.

Since:
1.0
- (AGSSimpleLineSymbol*) outline [read, write, retain]

Outline of the marker.

Since:
1.0
- (BOOL) rotateAroundOffset [read, write, assign, inherited]

If true, the symbol will rotate around the offset location as opposed to the center of the symbol.

Since:
1.8
- (CGFloat) size [read, write, assign]

Size of the marker in pixels. Default is 12x12.

Since:
1.0
- (AGSSimpleMarkerSymbolStyle) style [read, write, assign]

The marker style. Possible values include

  • AGSSimpleMarkerSymbolStyleCircle
  • AGSSimpleMarkerSymbolStyleCross
  • AGSSimpleMarkerSymbolStyleDiamond
  • AGSSimpleMarkerSymbolStyleSquare
  • AGSSimpleMarkerSymbolStyleX

Default is AGSSimpleMarkerSymbolStyleCircle.

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

The offset on the x-axis in points, relative to the center of the marker. Default is 0.0 For example, a value of -5 will shift the marker left by 5 points.

This is useful when the marker needs to be offset to properly coincide with a location on the map.

For example, consider an AGSPictureMarkerSymbol using the image of a pushpin. By default, the center of the image will be used as the anchor to center the image at the map location. However, if you wanted the needle of the pushpin to end at the map location, you would need to specify an xoffset and a yoffset to shift the image appropriately.

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

The offset on the y-axis in points, relative to the center of the marker. Default is 0.0 For example, a value of -5 will shift the marker down by 5 points.

This is useful when the marker needs to be offset to properly conicide with a location on the map.

For example, consider an AGSPictureMarkerSymbol using the image of a pushpin. By default, the center of the image will be used as the anchor to center the image at the map location. However, if you wanted the needle of the pushpin to end at the map location, you would need to specify an xoffset and a yoffset to shift the image appropriately.

Since:
1.0