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 05-25-2007, 11:14 AM   #1
vash
Senior Member
 
Join Date: May 2007
Location: Toulouse
Posts: 120
vash is on a distinguished road
Default WWJ and GeoRss

I'm working on a GeoRss viewer plugin for worldwind. It is based on the GeoRssParser class that i found on the sdk but i add a other class to handle point because the base class only handle shape. I render this point as icon on worldwind.

I plan to release a first version today.

My coworker (pred) is working on a GeoRss editor based on worldwind

My first result with this georss : http://earthquake.usgs.gov/eqcenter/...s7day-M2.5.xml

vash is offline   Reply With Quote
Old 05-25-2007, 04:10 PM   #2
vash
Senior Member
 
Join Date: May 2007
Location: Toulouse
Posts: 120
vash is on a distinguished road
Default

I have done a first version of the georss plugin.

How to use it :
1. Download georss_worldwind_plugin_v_0.1.0.jar and 32x32-icon-georss2.png

2. In your IDE, add georss_worldwind_plugin_v_0.1.0.jar to your project and classpath and copy the image file into the src/images/ directory

3. In BasicDemo.java:
- add this line to the layers array definition (line 10)
new BasicDemo.LayerAction(new GeoRssIconLayer("http://earthquake.usgs.gov/eqcenter/catalogs/eqs7day-M2.5.xml","EartQuake","",null), true),
- add this line to the layers initialisation (line 239)
if (action.layer instanceof GeoRssIconLayer)
((GeoRssIconLayer) action.layer).setWwd(wwd);

4. Save and run

notes :
- It can only handle georss stream with <geo:lat></geo:lat> and <geo:long></geo:long> tags. I will add support for <georss:where></georss:where> tags soon.

- It needs Java SE 6 jvm for support of desktop integration, indeed when you click on a georss icon the default navigator is opened with the url of the georss item. I don't know what appends if you try to execute it with Java SE 5

Edit : You can try it with java web start : launch the GeoRssReaderDemo with java web start

Last edited by vash; 05-25-2007 at 09:49 PM.
vash is offline   Reply With Quote
Old 05-25-2007, 07:06 PM   #3
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 !
Would you mind sharing the source...
__________________
My World Wind Java Blog & WW.net Plugins page
patmurris is offline   Reply With Quote
Old 05-25-2007, 07:23 PM   #4
vash
Senior Member
 
Join Date: May 2007
Location: Toulouse
Posts: 120
vash is on a distinguished road
Default

Quote:
Originally Posted by patmurris View Post
Nice !
Would you mind sharing the source...
Of course ! you can get it here georss_worldwind_plugin_src_v_0.1.0.zip
vash is offline   Reply With Quote
Old 05-26-2007, 07:20 AM   #5
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

Yesterday i started working on a WW icon add-on loader and went pretty much the same route, except i read a local xml file - and i packed everything into one class. I used a couple lines of your code, but tried out another way to launch the browser that seems to work with java 1.5.

Check it out in this thread.
__________________
My World Wind Java Blog & WW.net Plugins page
patmurris is offline   Reply With Quote
Old 05-26-2007, 09:54 AM   #6
vash
Senior Member
 
Join Date: May 2007
Location: Toulouse
Posts: 120
vash is on a distinguished road
Default

Quote:
Originally Posted by patmurris View Post
I used a couple lines of your code, but tried out another way to launch the browser that seems to work with java 1.5.
I see this is that line of code
Code:
Runtime.getRuntime().exec("cmd /c start " + icon.getUrl())
But this way works only on windows i think.
vash is offline   Reply With Quote
Old 05-26-2007, 05:38 PM   #7
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

Yea... i doubt the "cmd /c start" will work cross platform.
It seems overly complicated to strart a browser from java without a helper package though.
__________________
My World Wind Java Blog & WW.net Plugins page
patmurris is offline   Reply With Quote
Old 05-27-2007, 09:22 PM   #8
rafaeldff
Junior Member
 
Join Date: May 2007
Posts: 3
rafaeldff is on a distinguished road
Default

Quote:
Originally Posted by patmurris View Post
Yea... i doubt the "cmd /c start" will work cross platform.
It seems overly complicated to strart a browser from java without a helper package though.
In Java 6 it is simply a matter of calling
Code:
java.awt.Desktop.getDesktop().browse(new java.net.URI("http://www.worldwindcentral.com/"))
For previous versions of Java I think JDIC can help.
rafaeldff is offline   Reply With Quote
Old 05-27-2007, 10:37 PM   #9
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

Quote:
Originally Posted by rafaeldff View Post
In Java 6 it is simply a matter of calling
[code]
java.awt.Desktop.getDesktop().browse(... ). For previous versions of Java I think JDIC can help.
Desktop is what vash used, but i didnt want to add a 1.6 dependency for that feature... well not yet.

Maybe this is just a matter of issuing the right exec command depending on the platform, but from what i've seen of some helper classes it is much more complicated
__________________
My World Wind Java Blog & WW.net Plugins page
patmurris is offline   Reply With Quote
Old 05-29-2007, 05:19 PM   #10
what_nick
Worldwind Developer
 
Join Date: Jan 2006
Location: Hobart, Australia
Posts: 754
what_nick is an unknown quantity at this point
Default

Java does come with a simple HTML renderer(without javascript support etc.) which I have used in the past to make a simple java based browser.
__________________
Coding This and That in World Wind and helping new people out, as long as they don't pester too much.
Currently blogging at: http://whatnicklife.blogspot.com
Working at:
Aerometrex - http://aerometrex.com.au/blog/
Impact so far:


what_nick 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


All times are GMT +1. The time now is 01:06 PM.


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