×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    287

    unable to get latitude and longitude???

    hi,
    i am unable to get latitude and longitude in my application.The code that i have used in my application give below.Please give me a link if this code is wrong. please help me...


    Code:
      User::LeaveIfError(iLocationServer.Connect());
        // open positioner
        User::LeaveIfError(iPositioner.Open(iLocationServer));
        // set our application as location requestor
        User::LeaveIfError(iPositioner.SetRequestor(
            CRequestor::ERequestorService, CRequestor::EFormatApplication, *iAppName));
        // set maximum allowed time for a location request
        TTimeIntervalMicroSeconds timeOut(30000000); // 30 sec
        TPositionUpdateOptions updateOptions;
        updateOptions.SetUpdateTimeOut(timeOut);
        User::LeaveIfError(iPositioner.SetUpdateOptions(updateOptions));
       iPositioner.NotifyPositionUpdate(iPositionInfo, iStatus);
    
        TPosition pos;
            iPositionInfo.GetPosition(pos);
            aLatitude = pos.Latitude();
            aLongitude = pos.Longitude();

  2. #2
    Regular Contributor
    Join Date
    Mar 2009
    Posts
    132

    Re: unable to get latitude and longitude???

    Please go through sdk examples and forum nokia provided examples(location based).Where u will get more details.

  3. #3
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: unable to get latitude and longitude???

    I see a iStatus in your code. Is there an active object somewhere in the shaddows? Is there a call to SetActive and a RunL waiting to handle the data upon NotifyPositionUpdate's completion?
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

Similar Threads

  1. Displaying Latitude & Longitude: 2 problems
    By nstapleton in forum Symbian
    Replies: 10
    Last Post: 2009-05-26, 15:15
  2. How to get the addressInfo for a given latitude and longitude
    By m.manojkumar in forum Mobile Java General
    Replies: 2
    Last Post: 2009-04-18, 11:24
  3. Open google map site with current Longitude and Latitude
    By videoFx in forum [Archived] Flash Lite on Nokia Devices
    Replies: 3
    Last Post: 2009-04-06, 18:11

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×