• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Applet using a graphical map

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
There's a city wid manhunt for this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic