×

Discussion Board

Results 1 to 14 of 14

Hybrid View

  1. #1
    Registered User
    Join Date
    Jul 2009
    Posts
    19

    How to Scroll/Drag Google maps

    Hi,

    I am developing a J2ME application in which I need to use google maps. At present I am using Google Static maps for mobile devices. The problem with these maps is that I am not able to drag the map using the Mobile Phone's Joystick.

    I have a requirement to drag the map using the phones joystick. Please let me know how to achieve this.


    Regards,
    Madhu.

  2. #2
    Super Contributor
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,326

    Smile Re: How to Scroll/Drag Google maps

    Yes,
    This article below contains useful data about google map in JAVA ME..
    Also this article contains useful link at the end of this article ..
    You can check this...
    Google map in J2ME

    best regards,
    rahulvala

  3. #3
    Super Contributor
    Join Date
    Apr 2009
    Posts
    572

    Re: How to Scroll/Drag Google maps

    Basically its hard part for making google maps based apps as google only provide static images but one can make the maps scroll but that require too much calculations nd logic like--depending on the zoom level and and pointer pressed changing the coordinates used for fetching the maps images from server
    Regards,
    Saurabh

  4. #4
    Registered User
    Join Date
    Jul 2009
    Posts
    19

    Re: How to Scroll/Drag Google maps

    Hi Rahulvala ,

    Thank you for the reply.
    Could you please let me know more about that "adjust" method in the link posted by you.I am not able to understand what that method does and also it is mentioned in the article that "adjust" method should be used to scroll the map. Please let me know how to call these methods whenever we use the phone joystick to scroll the map.



    Regards,
    Madhu.

  5. #5
    Super Contributor
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,326

    Smile Re: How to Scroll/Drag Google maps

    f you need to scroll your map, you'll need to calculate a new center for your static image. The following adjust() method will return the new map center latitude and longitude, accepting the following arguments:

    the current center latitute and longitude coordinates
    the deltaX and deltaY, in pixels, of new map center
    the map zoom level

    Look when we are scrolling image only center changes , So new center will need the new values of latitude and longitude values....

    Go to this link : Map



    best regards

  6. #6
    Registered User
    Join Date
    Jul 2009
    Posts
    19

    Re: How to Scroll/Drag Google maps

    HI,

    I am very new to J2ME and appreciate your response.

    When do you I call this method.I want to scroll the map using the phone joystick. So how do I call this method on an action of joystick?, i.e when i move the joy stick to the left the map should scroll to the left and on moving the joystick to the right i should be able to scroll the map to the right.



    Regards,
    Madhu.

  7. #7
    Super Contributor
    Join Date
    Oct 2008
    Location
    INDIA
    Posts
    2,326

    Smile Re: How to Scroll/Drag Google maps

    Have you used the code which is given in the article ..
    Use it ...

    Best regards..

Similar Threads

  1. Google Maps Api problem
    By ingsaurabh in forum Mobile Java General
    Replies: 7
    Last Post: 2009-07-29, 16:38
  2. [Moved} Google Maps: start from contacts
    By st.b in forum General Development Questions
    Replies: 0
    Last Post: 2008-11-06, 10:31

Posting Permissions

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