Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor arun09's Avatar
    Join Date
    Feb 2009
    Posts
    287
    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 sk.panda's Avatar
    Join Date
    Mar 2009
    Posts
    132
    Please go through sdk examples and forum nokia provided examples(location based).Where u will get more details.

  3. #3
    Nokia Developer Moderator ltomuta's Avatar
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,335
    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?

Similar Threads

  1. JSR 179 -Getting Longitude Latitude Values of Current Location
    By satyarajasekhar in forum Geolocation and Navigation
    Replies: 11
    Last Post: 2011-11-16, 12:00
  2. Displaying Latitude & Longitude: 2 problems
    By nstapleton in forum Symbian C++
    Replies: 10
    Last Post: 2009-05-26, 15:15
  3. 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
  4. 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
  5. Format of longitude and latitude
    By asparov in forum Geolocation and Navigation
    Replies: 6
    Last Post: 2008-10-09, 09:54

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved