World Wind Forums

Go Back   World Wind Forums > WorldWind JAVA forums > Development Help

Development Help Help for building applications or diagnosing problems with WWJ

Reply
 
Thread Tools Display Modes
Old 07-11-2008, 11:42 PM   #1
cmaxwell
World Wind enthusiast
 
Join Date: Aug 2004
Location: Los Angeles
Posts: 354
cmaxwell is an unknown quantity at this point
Default WWJ Kml basic implementation v1.0

Hey guys,

I thought I should share some KML code that I've been working on the past several weeks. It's basically a framework to load in KML files from a Uri, with hooks made for implementations of styles, placemark icons, network links (without the auto-update yet), and KMZ.

One issue is that I had to do was change the Layer interface to add a "Uid" (Unique Id) concept, and I changed AbstractLayer to assign it automatically when a layer is created. I've included the modified files. I might revisit this in a way that doesn't require this change, but I'm doing things in the interest of speed rather than compatibility with other groups.

You can see this in action at:
http://www.intelesense.net/ivj/

The "Users Online" layer is coming from a KML, and I also added the USGS Real-Time Earthquake KML file, which demostrates Network Links. Again, the network links don't refresh yet, but that shouldn't be too big a deal to add.
(There is a Layer Manager control that opens up from the left side of the applet.)

Let me know what you guys think, and feel free to help me make this better.

Thanks.
Attached Files
File Type: zip kmlsrc_v1.0.zip (27.8 KB, 466 views)
__________________
~ just a programmer ~
cmaxwell is offline   Reply With Quote
Old 07-12-2008, 01:00 AM   #2
cmaxwell
World Wind enthusiast
 
Join Date: Aug 2004
Location: Los Angeles
Posts: 354
cmaxwell is an unknown quantity at this point
Default

oh yeah, forgot to post how to use it:

KmlDocument kmlLayer = new KmlDocument(kmlUri, this.wwd, enabled);
kmlLayer.setName(layerName);

then add the layer to your layer tree.
__________________
~ just a programmer ~
cmaxwell is offline   Reply With Quote
Old 07-12-2008, 09:11 PM   #3
bull
Cosmic Overlord
 
bull's Avatar
 
Join Date: Oct 2004
Location: United Kingdom
Posts: 2,362
bull is an unknown quantity at this point
Default

Java! Dude what were you thinking Thanks for this though I'm sure many people will find it useful.
bull is offline   Reply With Quote
Old 07-13-2008, 02:31 AM   #4
cmaxwell
World Wind enthusiast
 
Join Date: Aug 2004
Location: Los Angeles
Posts: 354
cmaxwell is an unknown quantity at this point
Default

Quote:
Originally Posted by bull View Post
Java! Dude what were you thinking Thanks for this though I'm sure many people will find it useful.
It seems the people have spoken and they want Java, or more specifically, World Wind in a webpage. I thought the compatibility problems with WW.Net were bad...but this jogl applet stuff is just getting to be too much...
__________________
~ just a programmer ~
cmaxwell is offline   Reply With Quote
Old 07-13-2008, 10:36 PM   #5
bull
Cosmic Overlord
 
bull's Avatar
 
Join Date: Oct 2004
Location: United Kingdom
Posts: 2,362
bull is an unknown quantity at this point
Default

Someone managed to seprate WorldWindow, the changes are in SVN, not sure if that means you could run it in a browser, adamhill knows more, he was impressed with the changes. I do agree WW in a browser looks cool, but lots of people have had trouble getting it going, it's worse than .Net for dependencies, latest jogl, latest gpu driers, intel gpu issues (needs some sandard texture format or something), but of course it is still alpha
bull is offline   Reply With Quote
Old 07-14-2008, 12:19 PM   #6
patmurris
WWJ Consultant
 
patmurris's Avatar
 
Join Date: Jun 2005
Location: Saint-Paul de Vence, Alpes Maritimes, France
Posts: 3,412
patmurris is an unknown quantity at this point
Default

Nice work Chris. I haven't looked at the code yet, but thanks.
One thing with the applet: the VE layer should be higher up in the layer list - it gets overdrawn by other layers.
__________________
My World Wind Java Blog & WW.net Plugins page
patmurris is offline   Reply With Quote
Old 07-14-2008, 02:33 PM   #7
cmaxwell
World Wind enthusiast
 
Join Date: Aug 2004
Location: Los Angeles
Posts: 354
cmaxwell is an unknown quantity at this point
Default

Quote:
Originally Posted by patmurris View Post
Nice work Chris. I haven't looked at the code yet, but thanks.
One thing with the applet: the VE layer should be higher up in the layer list - it gets overdrawn by other layers.
Yeah, I've been playing around so much that i haven't really been keeping track of where certain layers show up.
__________________
~ just a programmer ~
cmaxwell is offline   Reply With Quote
Old 07-15-2008, 07:30 PM   #8
mikequentel
Junior Member
 
Join Date: May 2007
Location: Ottawa, Ontario, Canada
Posts: 5
mikequentel is on a distinguished road
Default

Thank you for sharing this! The demo looks excellent.
mikequentel is offline   Reply With Quote
Old 07-15-2008, 11:23 PM   #9
James_In_Utah
Super Member
 
James_In_Utah's Avatar
 
Join Date: Jan 2006
Location: Eden, Utah
Posts: 1,779
James_In_Utah
Default

I must be doing something wrong. The demo is not working for me. I just installed the latest Jave RTE. I can see the menu, and the placemarks, but no globe. Maybe my 128MB video card and 1GB of ram isn't enough?
James
James_In_Utah is offline   Reply With Quote
Old 07-16-2008, 01:46 AM   #10
cmaxwell
World Wind enthusiast
 
Join Date: Aug 2004
Location: Los Angeles
Posts: 354
cmaxwell is an unknown quantity at this point
Default

Quote:
Originally Posted by James_In_Utah View Post
I must be doing something wrong. The demo is not working for me. I just installed the latest Jave RTE. I can see the menu, and the placemarks, but no globe. Maybe my 128MB video card and 1GB of ram isn't enough?
James
Are you able to get the worldwind.arc.nasa.gov/java/demos to work properly? Specifically the applet demos near the middle to bottom of the page?
__________________
~ just a programmer ~
cmaxwell is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
WWJ and Platform-dependence smcnaughton Development Help 31 11-11-2009 01:09 PM
Save to KML activated in WWJ : examples/Annotations.java Karina Applications 10 05-05-2008 06:10 AM
need help with worldwind applet blackscholes Development Help 7 11-12-2007 08:45 PM
HELP needed to get started in WWJ! Thanks! emaronchi Development Help 3 10-18-2007 10:01 PM
WWJ with KML for animations shlomi Add-ons & Scripts 1 08-31-2007 01:59 PM


All times are GMT +1. The time now is 08:40 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.