Product: MapXtreme Java
Platform: Not Platform Related
Adding a layer to MapXtreme 4.7 JSP WMS Custom Tag Sample.
There are two ways in which a user can add a layer to the WMS Custom Tag Sample.
One approach is through the MapXtreme Java Manager.
1. Open a layer desired to save.
2. In Layer Control, hit Save.
3. Open the layers\world directory or wherever it is desired to save it.
4. Assign a name to it (making it now a named layer), and save.
The layer should now be visible in the WMS Sample's list of layers.
An alternate way to expand the available layers collection in the WMS Custom Tag Sample is to manually modify the following settings.
1. To allow the capabilities.xml to maintain its settings (such that it does not re-create itself at each startup), it is necessary to first modify the web.xml file located in the Tomcat-4.1\webapps\wmsserver111\WEB-INF directory.
In the web.xml file uncomment the following and replace "mymachine" with the machine name:
Once this step is complete, the capabilities.xml file should maintain its settings and not continually specify the machine's IP address, which can pose problems especially for those users who can expect their IP address to change.
2. Navigate to the following location:
3. Make a copy of one of the existing XML files and rename the file to a different name.
4. Modify the following values (in red) in a text editor to reflect the layer's name/location desired to add and save the changes:
<MapDefinitionLayer Level="-1" Name="Ocean">
5. Start the server and proceed to the JSP WMS Custom Tags Sample.
6. Beneath the Custom Tags Layer Control click on the "Add" button.
7. A dialog box should appear. Select the default server setting and drop down the layer window. The reference to the new layer desired to add should appear.
8. Select "OK" and the new layer should appear.
Make sure to copy/modify an XML file in the mapxtreme47\resources\layers\world directory, as their are similar files located elsewhere.
Follow the above steps.
Last Modified: 10/02/2003 11:01:38 AM