• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Applet using a graphical map

 
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
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • 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
 
My first bit of advice is that if you are going to be a mime, you shouldn't talk. Even the tiny ad is nodding:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic