Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet using a graphical map

 
Ken
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm working on my first Java project. I need to map various cities on a map of the United States. The cities are static and I will be passing the X,Y coordinates and City name as parameters. Should I be using Latitude and Longitude or pixels to map these points. Once the Cities are in place, I need to draw lines from city to city based upon user selection (I know what lines to draw before I call the applet). This is really another set of Parameters. Can I do this? All I know is that I'll be working with the Java 2-D API. Any advice would be greatly appeciated.
Thanks,
Ken
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the cities are static why do you have to pass x, y coordinates in as parameters? If they are static why are their coordinates not just saved statically with the city? Cities do not change location! ( Well, not that often... )

Another thing, I would not use the Java 2D API for this. Personally, I love the 2D API, but for applets it is better to stick with just AWT if you can, because anything added after Java 1.1 requires the user to download the Java 2 Plugin. From what you describe, this program would be no problem with using only AWT functionality.

HTH,
-Nate
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic