×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Nov 2007
    Posts
    8

    Format of longitude and latitude

    Hi All,

    How can i get longitude and latitude in the following format:

    longitude - (E|W)dddmm.mmmm
    For example - E12129.2186 which means E 121°29.2186’

    latitude - (N|S)ddmm.mmmm
    For example - N2459.8915 which means N 24°59.8915’

    Please advise.
    Thanks.

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

    Re: Format of longitude and latitude

    In SDK's LocationRefAppForS60 example application you have

    Quote Originally Posted by LBSReferenceContainer.cpp
    // -----------------------------------------------------------------------------
    // CLbsReferenceContainer::GetDegreesString
    // Changes latitude or longitude represented as degrees to a string of
    // a form +DDD'MM''SS.SSSS
    // -----------------------------------------------------------------------------
    //

    void CLbsReferenceContainer::GetDegreesString(
    const TReal64& aDegrees,TBuf<KDegreeLength>& aDegreesString) const
    {
    ...
    }
    It is trivial to modify that method to return the data in your choice of format.
    -- 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

  3. #3
    Registered User
    Join Date
    Sep 2006
    Posts
    15

    Re: Format of longitude and latitude

    Hi,
    I am getting Lat/Long in below mention format:
    Latitude
    +61o26'53".239

    Longitude
    +23o51'16".980

    Now, How to get the Place name from the the Lat/Long information??

    Thanks,
    Amit

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

    Re: Format of longitude and latitude

    Google a bit for "geocoding" and you will find the answer.

    There is no S60 API to provide access to such features (or rather there is an API but there is no service provider) so you will have to use external resources to get this service. E.g. check if Google's license allows you to use their Geocoding API from a mobile application.
    -- 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

  5. #5
    Registered User
    Join Date
    Oct 2008
    Posts
    1

    Re: Format of longitude and latitude

    Hi,

    how can i retrieve longitude and latitude values from my cell phone for searching later on Google Maps?

    Any reply or guidance shall be highly appreciated.


    Regards,

    Adnan..

  6. #6
    Registered User
    Join Date
    May 2007
    Location
    Poland
    Posts
    606

    Re: Format of longitude and latitude

    Hello,
    try this:

    Code:
    TRealFormat realFormat;
    realFormat.iType = KRealFormatCalculator | KDoNotUseTriads;
    realFormat.iWidth = 30;
    realFormat.iPlaces = 6;
    iLatitude.Zero();
    iLongitude.Zero();
    
    iLatitude.AppendNum(aLatitude, realFormat);
    iLongitude.AppendNum(aLongitude, realFormat);

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

    Re: Format of longitude and latitude

    Quote Originally Posted by adnan11_pk View Post
    Hi,

    how can i retrieve longitude and latitude values from my cell phone for searching later on Google Maps?

    Any reply or guidance shall be highly appreciated.


    Regards,

    Adnan..
    Depending on the targeted phone you might have the option of doing this in Java or Symbian C++. See http://www.forum.nokia.com/lbs for details about available APIs then come back and ask for more technology specific questions (if you still have any ... )
    -- 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. Set Exif Gps Info Latitude.
    By shashishaw in forum Symbian
    Replies: 15
    Last Post: 2009-03-24, 16:50
  2. retrieve longitute latitude from GPS receiver
    By mytilinick in forum Bluetooth Technology
    Replies: 3
    Last Post: 2007-01-08, 15:30
  3. 9210 City latitude and longitude
    By nickct in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2002-08-16, 10:38

Posting Permissions

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