AGSGPS Class Reference


Description

This object controls how the map responds to location updates. It provides a simple façade over the CoreLocation framework and greatly simplifies working with location services.

To make the map start responding, use the start method. Ensure the map is loaded successfully before you call start.

To make the map stop responding, use the stop method.

By default, the map uses a blue, round symbol to display the device's location. The map will always try to get most accurate location available. Depending upon signal strength, satellite positions, and other factors, the location reported could be a best possible approximation. The map displays a blue-circle around the location symbol to indicate the range of accuracy. As the device moves, the map will respond to location updates and appropriately udpate the position of the location symbol.

See also:
Conceptual Doc: Display location on the map
Sample: GPS Sample
Since:
1.0

List of all members.

Public Member Functions

(BOOL autoPan) - __attribute__
(CLLocation *) - currentLocation
(void) - start
(void) - stop

Properties

AGSGPSAutoPanMode autoPanMode
AGSPointcurrentPoint
BOOL enabled
id< AGSGPSInfoTemplateDelegateinfoTemplateDelegate
UIInterfaceOrientation interfaceOrientation
float navigationPointHeightFactor
float wanderExtentFactor

Member Function Documentation

- (BOOL autoPan) __attribute__ ((deprecated))   

Indicates whether or not the map should automatically pan to the latest recieved GPS location. The default is NO.

Since:
1.0
Deprecated:
Deprecated at 2.1. Use autoPanMode property instead.
- (CLLocation*) currentLocation  

Retrieve the current GPS location. This is the raw location information provided by iOS and is typically in the WGS84 coordinate system.

Since:
1.0
- (void) start  

Make the map start responding to GPS input. The map must be loaded before you invoke this method.

Since:
1.0
- (void) stop  

Make the map stop responding to GPS input.

Since:
1.0

Property Documentation

- (AGSGPSAutoPanMode) autoPanMode [read, write, assign]

Defines the map's auto-pan behavior.

Since:
2.1
- (AGSPoint*) currentPoint [read, retain]

The latest recieved GPS location, reprojected to match the map's spatial reference.

Since:
1.0
- (BOOL) enabled [read, assign]

Indicates whether or not the map will respond to GPS input.

Since:
1.0
- (id<AGSGPSInfoTemplateDelegate>) infoTemplateDelegate [read, write, assign]

Template describing how the callout should display information for location updates.

Since:
1.0
- (UIInterfaceOrientation) interfaceOrientation [read, write, assign]

The orientation of the interface. You must set this if you are using the compass navigation mode and your application user interface orientation is not portrait. This is used for offsetting the compass heading based on the user interface orientation.

Since:
2.1
- (float) navigationPointHeightFactor [read, write, assign]

The height factor for placing the GPS location symbol when in navigation auto pan mode. The default is 0.125 (1/8th), which places it 1/8th of the height of the map view from the bottom of the map view.

Since:
2.1
- (float) wanderExtentFactor [read, write, assign]

The factor that is used to determine when the map recenters on the gps location. This is used only when autoPanMode is AGSGPSAutoPanModeDefault. The map automatically recenters when the location symbol moves outside the wander extent. The default value for this property is 0.5. The value expected is between 0 and 1. A value of 0.25 means that an extent 25% of the current extent is used as the "wander" extent. A value of 1 means that the entire extent in view is used as the "wander" extent.

Since:
2.1