AGSPictureMarkerSymbol Class Reference


Description

Instances of this class represent picture 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. Picture marker symbols display graphics using a picture image.

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

List of all members.

Public Member Functions

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

Static Public Member Functions

(id) + pictureMarkerSymbolWithImage:
(id) + pictureMarkerSymbolWithImageNamed:

Properties

CGFloat angle
UIColor * color
CGPoint hotspot
UIImage * image
NSString * imageName
BOOL rotateAroundOffset
CGSize size
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) initWithImage: (UIImage *)  image  

Initialize symbol with marker image.

Parameters:
image The image for the marker.
Since:
1.0
- (id) initWithImageNamed: (NSString *)  imageName  

Initialize symbol with name of image to draw marker.

Parameters:
imageName The name of the image to draw the marker.
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) pictureMarkerSymbolWithImage: (UIImage *)  image  

Initialize autoreleased symbol with marker image.

Parameters:
image The image for the marker.
Since:
1.0
+ (id) pictureMarkerSymbolWithImageNamed: (NSString *)  imageName  

Initialize autoreleased symbol with name of image to draw marker.

Parameters:
imageName The name of the image to draw the marker.
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
- (UIImage*) image [read, retain]

Image used as the marker.

Since:
1.0
- (NSString*) imageName [read, write, copy]

Name of the image to be used as 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
- (CGSize) size [read, write, assign]

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

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