Results 1 to 8 of 8
Thread: Google map in swing app?
- 02-08-2011, 01:36 PM #1
Member
- Join Date
- Aug 2010
- Posts
- 29
- Rep Power
- 0
Google map in swing app?
Hi,
I was working on a project knows as gps vechile tracker,where we track the vechile using the gps hardware,which basically needs a map to track the vechiles successfully ,Neways my question is that is it possible to integrate google map onto the swing application?i googled this question but i dint get much help/info regarding this topic,
I even tryed to integrate the google map onto the swing application using jxmapviewer,but the map doesnt seem to appear on the frame :( :(
I would be really thankfull towards you if you can provide me "any" information on this!
Kind Regards,
Manish87
- 02-10-2011, 05:32 AM #2
Member
- Join Date
- Aug 2010
- Posts
- 29
- Rep Power
- 0
Anyone?????
- 02-10-2011, 05:38 AM #3
Senior Member
- Join Date
- Jan 2009
- Posts
- 671
- Rep Power
- 5
Google maps is it's own application. There's no straightforward way to integrate it seamlessly into you application. However, you can launch it as an independent process and interact with it using KML.
You'd be better served starting from the google maps API and writing your application around it than trying to retrofit it into another application.
- 02-10-2011, 05:56 AM #4
Member
- Join Date
- Aug 2010
- Posts
- 29
- Rep Power
- 0
Hi,
Sir,thanks for the reply.
how do you launch the webpage(google map) in swing app as a seperate process? can we integrate a "webpage" onto the swing app?can you please elaborate on this topic!
Kindly provide any tutorial/links in it!
Kind Regards,
Manish87
- 02-10-2011, 01:37 PM #5
Member
- Join Date
- Mar 2009
- Posts
- 70
- Rep Power
- 0
You cannot integrate a webpage well (i''ve tried, for the same reason) due to rendering issues, portability, etc.
You can use NASA's World Wind SDK (more like google earth, but you can have street maps, e.g. Open Street map, which is very good. Bing maps has excellent high resolution sattelite imagrey). I have used this, and it is very good, with a lot of features. (For example, line drawing for GPS). I used it with GPS myself when developing a ground station for UAV's. I think it even has google maps integrated. Just add it as another swing component - and it's read to use!
Another light weight option is the JXMapViewer, part of SwingX. Havn't used this extensively, but pretty good.
World Wind JAVA SDK
Swingx-ws — Project Kenai
- 02-10-2011, 04:07 PM #6
Member
- Join Date
- Aug 2010
- Posts
- 29
- Rep Power
- 0
Hi,
Thanks for the reply rp181.
i have already tryied out the JXMAPVIEWER component,it doesnt seem to display the map
in in netbeans 6.9.1 IDE.
Neways i have downloaded the world wind Java sdk as you suggested.what next? i would be really greatefull towards you if you can you guide me through this!.i googled about this topic a lot and i dint get much help on this topic!
Kind Regards,
Manish87
- 02-10-2011, 07:46 PM #7
Senior Member
- Join Date
- Jan 2009
- Posts
- 671
- Rep Power
- 5
To launch a subprocess, please read the API for java.lang.Runtime.exec().
- 02-10-2011, 09:35 PM #8
Member
- Join Date
- Mar 2009
- Posts
- 70
- Rep Power
- 0
The download comes with many, many examples. The readme should tell how to compile and run them. Basically, what I did, was run random examples, and get code (source is included) from the examples. In netbeans, first of all, add the world wind component to the palette. After adding the canvas (note, this isn't a class, add where appropriate):
Best way to learn the capabilities is to:Java Code://different layers you can add. More are available static final Layer boundries = new CountryBoundariesLayer(); //country boundries static final Layer landsat = new LandsatI3WMSLayer(); //land sat, kinda bad static final Layer osm = new OSMMapnikTransparentLayer(); //OpenStreetMap, very good static final Layer oosm = new OSMCycleMapLayer(); //OSM with smaller trails, very good static final Layer virtualearth = new MSVirtualEarthLayer(); //Bing Maps, Very, very good sattelite (high res) static final Layer usgsurban = new USGSUrbanAreaOrtho(); //good, outdated static final Layer grid = new UTMGraticuleLayer(); //a grid THIS CAN CAUSE IMMENSE SLOWDOWN ON SOME COMPUTERS //do this first for no null exception. Before init components: worldWindCanvas = new gov.nasa.worldwind.awt.WorldWindowGLCanvas(); worldWindCanvas.setModel(new BasicModel()); OrbitView ov = (OrbitView) worldWindCanvas.getView(); // for navigation worldWindCanvas.getModel().getLayers().add(osm); //add whatever layer, optional. The default is NASA's blue marble map - not much zoom available worldWindCanvas.redrawNow();
1) Download WorldWind, it is an actual application (like google earth). Almost everything in there can be done
2) Look through examples!
3) More examples!
Similar Threads
-
Java and Google Search
By V.J in forum NetworkingReplies: 7Last Post: 12-27-2010, 06:19 AM -
Google app engine error
By prabhug1987 in forum JavaServer Pages (JSP) and JSTLReplies: 0Last Post: 11-29-2010, 05:41 AM -
google in web browser
By jeff666 in forum AWT / SwingReplies: 1Last Post: 07-06-2008, 08:03 PM -
Google Maps API
By mew in forum New To JavaReplies: 0Last Post: 12-26-2007, 10:28 AM -
Google Singleton Detector 0.7.2
By levent in forum Java SoftwareReplies: 0Last Post: 07-26-2007, 08:12 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks