0

I need to solve a simple problem regarding Showing Map on Swing based application in java. I am having list of latitudes and longitudes (GPS Tracks) , I need to draw some routes using these routes and probably want to draw maps like GoogleMaps.

Is it possible to draw Google Maps using GPS info (latitude, longitude) via OpenMapStreet API. Based on different user selection over JFrame control (e.g Row containing Route Info) one of specific area (panel) a map should be drawn (probably a Google Map).

I read the OpenMapStreet API. But I don't found a concrete example drawing the map over the Swing application using given latitudes/longitudes (GPS Info).

Any idea (probably some code sample) I would be obliged and thankful.

Edit:

Let say I have the following longitudes/latitudes info.

Longitudes    Latitudes

2546789.510  ,7894125.10 ( Linhaeim)
1547897.111  ,4569872.10     ..
2546789.510  ,2365478.79     ..
2314561.510  ,7894125.11
5467891.510  ,7894125.22
4578933.510  ,2647835.33
6547891.510  ,2254776.44
3211457.510  ,7899901.37
6987888.510  ,2010009.78
3654789.510  ,9876510.61
5547890.510  ,3145678.39
1789000.510  ,4698333.58
2778900.510  ,3254788.97
7455555.510  ,3378945.27 ( XYZ )

Moreover some StopNames of Journey also associates with these gps coordinates ( like Linhaeim, Im Saal, KreiserStr, ABC,XYZ, ........)

I have above data stored inside databases with some other additional information ( e.g JourneyId,JourneyStartTime,JourneyEndTime.....). So, I need the map like which shows above coordinates as route connecting these coordinates.

If GoogleMap API works for this , then it would too be acceptable for me. Usage of Google Maps API for this context , Please point me small tutorial even to look for for incarporating above map problem.

If still not clear, I would happy to edit it again :-)

Usman
  • 2,742
  • 4
  • 44
  • 82
  • 1
    *"I need to solve a simple problem"* What is it that makes you think it is 'simple'? How can you even know that until the task is completed? BTW - what is your question? – Andrew Thompson Jul 23 '12 at 03:45
  • I don't understand why you want to draw google maps using open street maps api. This doesn't make sense. Pick one or the other... – Rick Mangi Jul 23 '12 at 03:51
  • Andrew : The question is simple enough. I need simple to show a map on my JFrame of specific coordinates ( List of GPS Coordinates ). The map should have some points showing connecting these coordinates. Please look to Edit. – Usman Jul 23 '12 at 08:01
  • have a look at http://java.net/projects/swingx-ws – kleopatra Jul 23 '12 at 08:33
  • @Usman: Geodesy is _not_ simple. See also [`JMapViewer`](http://wiki.openstreetmap.org/wiki/JMapViewer). – trashgod Jul 23 '12 at 11:24

0 Answers0