Bruce Schubert
|
Posted: October 05, 2010 13:04 by Bruce Schubert
|
|
The Emxsys - WorldWind module is now initialized via the NetBeans layer.xml file. This API allows other modules (like Emxsys - LandFire) to plug-in new capabilities (e.g., map layers) when they are loaded. Here's some snippets from the Emxsys - WorldWind layer.xml file. Note the use of the nbinst and nbres protocols in the URLs. They provide a mechanism for the specified files to be found on the local filesystem or in a resource jar respectively, without having to specify an absolute path here in the layer.xml file. Also note the use of the instanceClass and instanceCreate attributes. When a NetBeans Lookup is queried for the merged and sorted list of WorldWind/Layers, the instanceClass objects are created and the instanceCreate factory methods are invoked.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.2//EN" "http://www.netbeans.org/dtds/filesystem-1_2.dtd">
<filesystem>
<folder name="WorldWind">
<folder name="Config">
<file name="worldwind.xml">
<!-- Note regarding nbinst: the host (module) name may prefix the path - see InstalledFileLocator class for more info-->
<attr name="configDocument" urlvalue="nbinst://com-emxsys-worldwind/modules/ext/config/worldwind/worldwind-overrides.xml"/>
</file>
</folder>
<folder name="Layers">
<file name="Earth.instance">
<attr name="displayName" bundlevalue="com.emxsys.worldwind.Bundle#WorldWind/Layers/Earth.instance"/>
<attr name="instanceClass" stringvalue="gov.nasa.worldwind.layers.Earth.BMNGOneImage"/>
<attr name="name" stringvalue="Earth Image"/>
<attr name="position" intvalue="300"/>
</file>
<file name="BlueMarble.instance">
<attr name="name" stringvalue="Blue Marble*"/>
<attr name="config" urlvalue="nbres:/config/Earth/BMNGWMSLayer.xml"/>
<attr name="displayName" bundlevalue="com.emxsys.worldwind.Bundle#WorldWind/Layers/BlueMarble.instance"/>
<attr name="instanceClass" stringvalue="gov.nasa.worldwind.layers.Layer"/>
<attr name="instanceCreate" methodvalue="com.emxsys.worldwind.layers.api.LayerFactory.createLayer"/>
<!-- Look for the config file resource on the classpath - e.g. worldwind.jar-->
<attr name="actuate" stringvalue="onLoad"/>
<attr name="position" intvalue="400"/>
</file>
<file name="Landsat.instance">
<attr name="actuate" stringvalue="onLoad"/>
<attr name="config" urlvalue="nbres:/config/Earth/LandsatI3WMSLayer.xml"/>
<attr name="displayName" bundlevalue="com.emxsys.worldwind.Bundle#WorldWind/Layers/Landsat.instance"/>
<attr name="instanceClass" stringvalue="gov.nasa.worldwind.layers.Layer"/>
<attr name="instanceCreate" methodvalue="com.emxsys.worldwind.layers.api.LayerFactory.createLayer"/>
<!-- Look for the config file resource on the classpath - e.g. worldwind.jar-->
<attr name="name" stringvalue="i3 Landsat"/>
<attr name="position" intvalue="500"/>
</file>
<file name="Compass.instance">
<attr name="displayName" bundlevalue="com.emxsys.worldwind.Bundle#WorldWind/Layers/Compass.instance"/>
<attr name="instanceClass" stringvalue="gov.nasa.worldwind.layers.CompassLayer"/>
<attr name="name" stringvalue="Compass Overlay"/>
<attr name="position" intvalue="1400"/>
</file>
</folder>
</folder>
See the Emxsys - WorldWind and Emxsys - LandFire modules in SVN for more information. |
CPS WorldWind Module updates
Replies: 0 - Last Post: October 05, 2010 13:04
by: Bruce Schubert
by: Bruce Schubert
showing 1 - 1 of 1
Replies: 0 - Last Post: October 05, 2010 13:04
by: Bruce Schubert
by: Bruce Schubert






