Het is normaal manier om de GPS-gegevens te ontvangen.
[GPS-module] ---- (CLLocationManagerDelegate) ---> [YourLocationManager klasse]
locationManager: didUpdateToLocation: fromLocation:
Deze methode zal de gegevens ontvangen.
U kunt ook bellen met dezelfde methode bij YourLocationManager klasse van Test klasse.
[Test klasse] -------- oproep ------> [YourLocationManager klasse]
1 .. maken CLLocation object als dit ..... op Test klasse
CLLocationCoordinate2D locatie;
location.latitude = 37,0;
location.longitude = 127,0;
CLLocation * sampleLocation = [[CLLocation VERD] initWithCoordinate: location
hoogte: 100
horizontalAccuracy: 100
verticalAccuracy: 100
timestamp: [NSDate datum]];
je kunt alleen breedte, lengte, hoogte, hotizontal nauwkeurigheid, verticale nauwkeurigheid, timestamp te stellen.
je kunt niet instellen ... koers, snelheid.
2 .. noemen locationManager: didUpdateToLocation: fromLocation: methode op YourLocationmanager klasse van Test klasse.
[YourLocationManager locationManager: nihil of iets
didUpdateToLocation: sampleLocation
fromLocation: sampleLocation of nihil of iets];
U kunt NSTimer gebruiken om meer gegevens te verzenden !!