Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User zhaling's Avatar
    Join Date
    Apr 2010
    Posts
    6
    Hi,all
    I have displayed a map on the phone.Then I want to add an animation car on the map.
    How could I implementation it ?

    Thank you in advance!

  2. #2
    Nokia Developer Champion raj_J2ME's Avatar
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,314
    Quote Originally Posted by zhaling View Post
    Hi,all
    I have displayed a map on the phone.Then I want to add an animation car on the map.
    How could I implementation it ?

    Thank you in advance!
    Do you mean the map of the game or what?
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  3. #3
    Registered User zhaling's Avatar
    Join Date
    Apr 2010
    Posts
    6
    Hi,raj_J2ME
    It is not a game. The map is a city map.And the Animation on the map just like a car moving in the Vehicle Monitoring System.

    Thanks,
    good regards!

  4. #4
    Nokia Developer Champion raj_J2ME's Avatar
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,314
    Quote Originally Posted by zhaling View Post
    Hi,raj_J2ME
    It is not a game. The map is a city map.And the Animation on the map just like a car moving in the Vehicle Monitoring System.

    Thanks,
    good regards!
    Okay,
    Well I am not much familiar with the Map API and hence I am leaving you with the other Gurus of this.Have a good luck.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  5. #5
    Nokia Developer Champion Tiger79's Avatar
    Join Date
    Apr 2007
    Posts
    2,697
    hehe,
    I'm afraid there are no map API guru's, simply because there is no map API :P

    How is thae map displayed ? Is it simply an Image ?
    If so you can superimpose the car Image on the map Image, another option would be to make the car a Sprite and then use the LayerManager to superimpose this Sprite (and maybe others?) on the map Image...

    To get a basic understanding on how to draw multiple images and/or Sprites you might want to look for some tutorial on game development on j2me... If i'm not mistaken there are even several on the Wiki !

  6. #6
    Registered User zhaling's Avatar
    Join Date
    Apr 2010
    Posts
    6
    Hi,Tiger79
    I displayed the map by the paint method in GameCanvas class. And I get the map resource from the server by http.
    The car moving trajectory is defined in the server.If I make the car a Sprite, how could I define the Sprite moving trajectory?

    Thanks
    good regards

  7. #7
    Nokia Developer Champion Tiger79's Avatar
    Join Date
    Apr 2007
    Posts
    2,697
    well then you will have to translate the trajectory into x-y coordinates which you can use on your 2d map (canvas)...
    that is doable if you don't only get an Image (your map) from the server but also some metadata regardign the trajectory..
    If you are only getting an Image which contains both the map and the trajectory already drawn on it then I guess you have no way to establish the trajectory...
    For example a Google Static Map with it's Static Map Paths just deliver an Image with no metadata, so you cannot establish anything from that
    http://code.google.com/intl/nl/apis/...ticmaps/#Paths

  8. #8
    Registered User zhaling's Avatar
    Join Date
    Apr 2010
    Posts
    6
    If I get the map from a wms server,and get the trajectory coordinates from another file which is generated in the server.
    Then Can I have ways to establish the trajectory??If have, how to establish it??

    Thanks
    Good Regards!

  9. #9
    Nokia Developer Champion Tiger79's Avatar
    Join Date
    Apr 2007
    Posts
    2,697
    it all dpeends on the map you receive..
    Is it only an Image which you are then gonna show, or does it contain metadata regarding the deliver Image ?
    I have never used wms so I have no idea what kind of a system that is, unfortunately I also don't have any time to learn about it so sorry about that...
    Anyways if you have the several "connecting point" (coordinates) for the trajectory you will need to have reference coordinates of the map/Image...
    If you have that it's time for some math, you could use Vector maths (for the trajectory from point to point) and geometry (for the placing of the points themselves)...

  10. #10
    Registered User zhaling's Avatar
    Join Date
    Apr 2010
    Posts
    6
    Thank you very much for your help!
    I will try to use SVG to display the animation car.


    Thanks with Good Regards!

Similar Threads

  1. Display Gif Animation on one side of the screen
    By Triard in forum Symbian Media (Closed)
    Replies: 2
    Last Post: 2010-02-23, 17:11
  2. [moved] Add our onw map provider into Nokia landmark
    By yanglfyangl in forum Geolocation and Navigation
    Replies: 1
    Last Post: 2008-12-01, 16:20
  3. City Map for 3650
    By malaysianppl in forum Symbian C++
    Replies: 0
    Last Post: 2004-03-17, 03:46
  4. Efficiently implementing a scrolling map system in J2ME
    By dwneonstar in forum Mobile Java General
    Replies: 3
    Last Post: 2003-05-21, 17:57

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