void LocationMonitorLocation(int flag);

 

Turns location monitoring on or off.

 

Return Value

 

None.

 

Parameters

 

flag

Setting to determine whether location monitoring should be on or off.

 

Remarks

 

LocationMonitorLocation() turns location monitoring on or off.  When location monitoring is turned on, the user will be presented with an alert stating that the application wants to know the device's current location.  At this point, the user may opt to disallow location monitoring.

 

NOTE: this function is effective on the device only.

 

Availability

 

Available in DragonFireSDK 1.4 and later.

 

Example

 

#include "DragonFireSDK.h"

 

int MyFont;

int LatitudeText;

int LongitudeText;

char TextBuffer[100];

 

void AppMain()

{

   LandscapeMode();

  // Begin monitoring location

   LocationMonitorLocation(1);

 

   MyFont = FontAdd("Helvetica", "Regular", 24, 0x00FF00);

   LatitudeText = TextAdd(10, 10, "Latitude:", MyFont);

   LongitudeText = TextAdd(10, 40, "Longitude:", MyFont);

}

 

void OnTimer()

{

  float lat;

  float lng;

 

   LocationGet(lat, lng);

 

   sprintf(TextBuffer, "Latitude: %f", lat);

   TextSetText(LatitudeText, TextBuffer);

 

   sprintf(TextBuffer, "Longitude: %f", lng);

   TextSetText(LongitudeText, TextBuffer);

}

 

void AppExit()

{

 

}