Skip to content
9miao Mobile Game edited this page Jul 8, 2014 · 1 revision

CALocationManager Detailed Description

Class Description

GPS location, you need to open GPS function of your devices if you want to locate with this method.

Base Class

CAObject

Attribute

Access modifier

Attribute name

Description

Protected

LocationDelegate

agent

Method

Access modifier

Method name

Description

Public

Create

Obtain singleton

Public

startLocation

Start location

Attribute Description

LocationDelegate
Type: CALocationDelegate*
Description: we need to inherit CALocationDelegate and rewrite the internal interface that is used to obtain position when using GPS location, so as to obtain position info.

Method Description

static CALocationManager create()*
Return value: CALocationManager*
Description: build locationManager object

void startLocation()
Return value: void
Description: start location

Example:

1

2

3

CALocationManager* loc = CALocationManager::create();

loc->setLocationDelegate(this);

loc->startLocation();

Clone this wiki locally