-
Notifications
You must be signed in to change notification settings - Fork 421
CALocationManager
GPS location, you need to open GPS function of your devices if you want to locate with this method.
CAObject
Access modifier |
Attribute name |
Description |
Protected |
LocationDelegate |
agent |
Access modifier |
Method name |
Description |
Public |
Create |
Obtain singleton |
Public |
startLocation |
Start location |
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.
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(); |