×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    53

    regarding gps and download of google map.

    HI,

    This is urgent.....

    I have downloaded a gps appa from the link
    http://wiki.forum.nokia.com/index.ph...Api_in_Symbian

    It downloads a google map and displays on the screen.

    I am trying to change 2 things in the query list of http request. but it is not working.....


    the present query list is
    /Prefix of google URL to retrieve Map
    // %S, %S will be replaced by latitude and longitude values respectively by the values retrieved from the method GetGPSInfoL

    _LIT(KGoogleMapURL,"http://maps.google.com/staticmap?center=%S,%S&format=jpg&zoom=8&size=240x320&key=");

    1 st change-> size
    --------------------
    current size is 240x320 (google map is displayed)
    when I cahnged to 1000x1000 it does not wok (blank screen is displayed)

    2 nd change-> latitude and longitude values
    ---------------------------------------------
    in the programme, the latitude and longitude is derived from call
    to function GetGPSInfoL() of appview. This calculates the current latitude and longitude values. stores them into "latitude" and "longitude" variables of class "appview" in its ".h" file.

    I increased the value of both latitude and longitude by 50.
    doing that also I get a blank screen

    Why is it so???????
    how to solve???????

    key used is
    _LIT(KGoogleMapKey,"ABQIAAAA7mTDJNgGP953Yt-jOVCpaRSSyDKWhj1AwFHP2_2SAaYvELj_yhTyAVWHzDWGNg0x2EqtccgujgzKwA");

    flow of the application downloaded
    -----------------------------------
    in case ECommand1 of appui.cpp->handlecommandL()---(on press of GPS MAP softkey)
    -------------------------------
    >it calls GetGpsInfoL() method of appview.cpp
    here 4 things happen in the following order
    1>gpspositionrequest class is constructed

    2>the FetchCurrentPositionL() of gpspositionrequest class is called, which finds out current gps longitude and latitude and stores them in "latitude" and "longitude" variables of appview.h

    3>the SetupFileDownload() method of appview is called. here "iRLbsImage" variable of class "appview.h" of type "RFile" is (opened)/(freshly created and opened) in write mode to be able to save jpg image of google map (that will be downloaded later through post request of http socket).

    4>SendHTTPRequestL()method of appview is called which initiates the get req.
    here 2 functions are done
    1>The query string for the http request is prepared and placed into "TempBuffer" variable of type "TBuf8<KDefaultBufferSize>". It is prepared through the help of format variable of type "TRealFormat". I guess it fomats the latitude and longitude values into string type from float.
    Then the http web page address(ww.google.com)is fomated with these latitude and longitude values and google key
    2>IssueHTTPGetL() method of "Clientengine.cpp" is called.Which prepares the socket connection through http protocol using get method. opens a transaction. during data transfer 2 cases of MHFRunL()method of "clientengine.cpp"are important
    a>case THTTPEvent::EGotResponseBodyData----> this is caleed when a part of the requested data is received(the whole data is not received in one go, but in parts). The data parts are saved to "datachunk" variables of type "MHTTPDataSupplier". Then "ClientBodyReceived()" method of "iObserver" variable is called. the iObserver points to appview class. so ClientBodyReceived()" method of appview.cpp variable is called. here it writes to the previously opened "RFile" variable, "iRLbsImage" ,those data parts ,while maintaining a pointer to index into the last data part written.
    b>case THTTPEvent::ESucceeded:------>this is called when the last part of the data part is received.this means the whole data we wanted is received.
    so the socket connection and transaction is closed, ClientBodyCompleted() method of iobserver (which is the appview) is called.this causes the closing of iRLbsImage variable. calls the SETImage() of "imagereader" class. here the image is prepared and draw event is generated by call to drawnow()through "ImageReadyL()" of iobserver. this observer also points to "appview" class.
    this calls the draw() of appview() method and google map appears on the screen.

  2. #2
    Registered User
    Join Date
    Sep 2008
    Posts
    3

    Wink Re: regarding gps and download of google map.

    hey the link is not working ---

    can u please post the link again or u can also send me the application by mail --

    earthsucks@gmail.com

    I am working on the same thing ....

  3. #3
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,674

    Re: regarding gps and download of google map.

    Sanee's link was probably this one: http://wiki.forum.nokia.com/index.ph...Api_in_Symbian

Similar Threads

  1. [anounce] Tracker.py GPS mapping application
    By hurenkam in forum Symbian
    Replies: 85
    Last Post: 2009-05-13, 10:38
  2. Replies: 5
    Last Post: 2008-09-26, 15:21
  3. Citymap (with GPS feature) application for Nokia N95 and 6110 navigator
    By vgps in forum General Development Questions
    Replies: 4
    Last Post: 2008-06-18, 02:22
  4. Nokia Map & N73
    By vnsbudhe in forum Bluetooth Technology
    Replies: 2
    Last Post: 2007-08-05, 14:41
  5. Bluetooth GPS simulator for j2me phone
    By vgps in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2007-02-09, 04:30

Posting Permissions

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