10.2.5: AGSLocationDisplay Class Reference
10.2.5
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
AGSLocationDisplay Class Reference

Description

This object controls how the map displays location information. It relies on its dataSource which provides location updates on a frequent basis.

To make the map start displaying location information, use the startDataSource method, but ensure the map is loaded successfully before you do..

To make the map stop displaying location information, use the stopDataSource method.

By default a blue, round symbol is used 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 also 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.

If you wish to customize the symbol for the location display, add images named "LocationDisplay.png", "LocationDisplayCourse.png", and "LocationDisplayHeading.png" as well as the corresponding @2x versions to your application's resources and the SDK will automatically pick them up instead of the default blue images.

See also
Conceptual Doc: Displaying location on the map
Sample: GPS Sample
Since
10.1.1
Inheritance diagram for AGSLocationDisplay:
<AGSLocationDisplayDataSourceDelegate>

Instance Methods

(void) - locationDisplayDataSource:didFailWithError:
 
(void) - locationDisplayDataSource:didUpdateWithHeading:
 
(void) - locationDisplayDataSource:didUpdateWithLocation:
 
(void) - locationDisplayDataSourceStarted:
 
(void) - locationDisplayDataSourceStopped:
 
(AGSPoint *) - mapLocation
 
(void) - startDataSource
 
(void) - stopDataSource
 

Properties

AGSSimpleFillSymbolaccuracySymbol
 
CGFloat alpha
 
AGSLocationDisplayAutoPanMode autoPanMode
 
AGSMarkerSymbolcourseSymbol
 
id< AGSLocationDisplayDataSourcedataSource
 
NSError * dataSourceError
 
BOOL dataSourceStarted
 
AGSMarkerSymboldefaultSymbol
 
AGSMarkerSymbolheadingSymbol
 
id
< AGSLocationDisplayInfoTemplateDelegate
infoTemplateDelegate
 
UIInterfaceOrientation interfaceOrientation
 
AGSLocationlocation
 
CGFloat navigationPointHeightFactor
 
AGSMarkerSymbolpingSymbol
 
BOOL showsAccuracy
 
BOOL showsPing
 
CGFloat wanderExtentFactor
 
double zoomScale
 

Method Documentation

- (void) locationDisplayDataSource: (id< AGSLocationDisplayDataSource >)  dataSource
didFailWithError: (NSError *)  error 
requiredinherited

Tell the delegate that the datasource is reporting a new heading.

Parameters
dataSourcethat has a new heading to report
errorThe error that occurred
Since
10.1.1
- (void) locationDisplayDataSource: (id< AGSLocationDisplayDataSource >)  dataSource
didUpdateWithHeading: (double)  heading 
requiredinherited

Tell the delegate that the datasource is reporting a new heading.

Parameters
dataSourcethat has a new heading to report
headingThe new heading information
Since
10.1.1
- (void) locationDisplayDataSource: (id< AGSLocationDisplayDataSource >)  dataSource
didUpdateWithLocation: (AGSLocation *)  location 
requiredinherited

Tells the delegate that the datasource is reporting new location.

Parameters
dataSourcethat has a new location to report
locationThe new location information
Since
10.1.1
- (void) locationDisplayDataSourceStarted: (id< AGSLocationDisplayDataSource >)  dataSource
requiredinherited

Tells the delegate that the datasource was started.

Parameters
dataSourcethat was started
Since
10.1.1
- (void) locationDisplayDataSourceStopped: (id< AGSLocationDisplayDataSource >)  dataSource
requiredinherited

Tells the delegate that the datasource was stopped.

Parameters
dataSourcethat was stopped
Since
10.1.1
- (AGSPoint*) mapLocation

The current location the display is at on the map, projected into map coordinates.

- (void) startDataSource

Starts the location display's datasource.

Since
10.1.1
- (void) stopDataSource

Stops the location display's datasource.

Since
10.1.1

Property Documentation

- (AGSSimpleFillSymbol*) accuracySymbol
readwritenonatomicstrong

The symbol that is used to show the accuracy of the location.

Since
10.2.2
- (CGFloat) alpha
readwritenonatomicassign

Sets an alpha on the location display.

Since
10.1.1
- (AGSLocationDisplayAutoPanMode) autoPanMode
readwritenonatomicassign

Defines the map's auto-pan behavior when new location updates are recieved. Default is AGSLocationDisplayAutoPanModeOff

Since
10.1.1
- (AGSMarkerSymbol*) courseSymbol
readwritenonatomicstrong

The symbol that is used when the location display has a velocity and course.

Since
10.2.2
- (id<AGSLocationDisplayDataSource>) dataSource
readwritenonatomicstrong

The source of location updates. Defaults to AGSCLLocationManagerLocationDisplayDataSource. You can create your own datasource, or choose from one of the datasources provided.

Since
10.1.1
- (NSError*) dataSourceError
readnonatomicstrong

Most recent error from the datasource. Will be nil'd out when/if a valid location is received from the datasource.

Since
10.1.1
- (BOOL) dataSourceStarted
readnonatomicassign

Indicates whether or not the display's datasource is started.

Since
10.1.1
- (AGSMarkerSymbol*) defaultSymbol
readwritenonatomicstrong

The symbol that is used when the location display is not moving or doesn't have a course.

Since
10.2.2
- (AGSMarkerSymbol*) headingSymbol
readwritenonatomicstrong

The symbol that is used when the location display is in compass mode.

Since
10.2.2
- (id<AGSLocationDisplayInfoTemplateDelegate>) infoTemplateDelegate
readwritenonatomicweak

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

Since
10.1.1
Deprecated:
Deprecated at 10.2. Please use AGSCalloutDelegate instead.
- (UIInterfaceOrientation) interfaceOrientation
readwritenonatomicassign

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
10.1.1
- (AGSLocation*) location
readnonatomicstrong

Most recent location update provided by the datasource

Since
10.1.1
- (CGFloat) navigationPointHeightFactor
readwritenonatomicassign

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
- (AGSMarkerSymbol*) pingSymbol
readwritenonatomicstrong

The symbol that is used to signify that a location display received a location update.

Since
10.2.2
- (BOOL) showsAccuracy
readwritenonatomicassign

Sets whether or not the location display shows a 'ping' animation when a new location is received.

Since
10.2.2
- (BOOL) showsPing
readwritenonatomicassign

Sets whether or not the location display shows a 'ping' animation when a new location is received.

Since
10.2
- (CGFloat) wanderExtentFactor
readwritenonatomicassign

The factor that is used to determine when the map recenters on the location. This is used only when autoPanMode is AGSLocationDisplayAutoPanModeDefault. 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
10.1.1
- (double) zoomScale
readwritenonatomicassign

Scale that the AGSLocationDisplay will auto zoom to. The AGSLocationDisplay will only auto zoom when it receives it's first location after the autoPanMode goes from AGSLocationDisplayAutoPanModeOff to any other value. Defaults to 10,000. A value of 0 or less will tell the location display not to auto zoom at all.

Since
10.1.1