views:

423

answers:

3

I would like to have support for Google Maps in my Java Swing desktop application. Is there an Google Maps component for Swing that is freely available? It would be good if it was extendable and maybe had support for other maps i.e. like OpenStreetMaps.

+6  A: 

You can use JXMapViewer look here http://today.java.net/pub/a/today/2007/10/30/building-maps-into-swing-app-with-jxmapviewer.html

HaMMeR
+6  A: 

How about JXMapViewer? Looks like it gets NASA's Blue Marble tile set by default (if you want 3D maps and Blue Marble WorldWindJava is an amazing API for mapping), but also works with OpenStreetMap. Or, looks like gmap-viewer is a project which can show you how it's done. Aerith also includes Google maps.

EDIT: Also, check out this related StackOverflow question. Looks like the FAQ, at least at that time, did not allow you to do what you want with Google Maps (OpenStreetMap, on the other hand, has desktop apps like Traveling Salesman and clearly embraces the desktop, as does WorldWind).

justkt
A: 

You can use Google visualisation library directly in java, where you can show Google Maps as you like.

Google Visualization API Gallery

sagar
How can I use Google visualisation in Java Swing? As what I understand they are only available for web applications.
Jonas