Rogue Wave JViews Diagrammer Sample: Working with JViews Maps


Description

This sample shows how to use the Rogue Wave JViews Maps product together with Rogue Wave JViews Diagrammer to display a diagram on top of a background map.

How to Use the Sample

How to Run the Sample as an Application

This sample can also be run as an application. The installation directory contains an executable JAR file, diagrammer-map.jar, that allows you to execute the sample with a double click from a file browser. Note that if you are using Internet Explorer, you can open the installation directory and execute the JAR file from the browser. This technique may not work in other Web browsers.

Alternatively, you can run the sample application from the command line. First check that the Ant utility is properly configured. If not, see the instructions on how to configure Ant for Rogue Wave JViews.

Then, go to the installation directory of the sample and type:

ant run

Topics Covered

Detailed Description

This sample shows how to use the Rogue Wave JViews Maps product together with Rogue Wave JViews Diagrammer to display a diagram on top of a background map.
The diagram represents assets in various towns, connected by links. It could represent factories, power supplies, internet nodes, or any other georeferenced objects.
The background is a tiled, multiresolution map of the USA: it consists of many small bitmap files covering a region of the world. The tiles are loaded using the load-on-demand feature of Rogue Wave JViews Maps: when you zoom the diagram in or out, more or less detailed bitmaps are loaded as needed according to the visible region.
The nodes of the diagram are georeferenced. That is, their positions are defined by the latitude and longitude properties instead of x and y. Rogue Wave JViews Maps is used to project these geographic locations onto coordinates on the screen.
The bridge between Rogue Wave JViews Diagrammer and Rogue Wave JViews Maps is the Map pluggable renderer provided by the SDM engine. To use a background map, all you have to do is activate this renderer (using the Designer is the easiest way), and specify the file that contains the map definition.
Instead of using the example map that is provided with this example, you can build your own map using the Map Builder application of Rogue Wave JViews Maps.
Note: You must have the Rogue Wave JViews Maps product installed to run this example, and you must have a valid license for that product.

Installation Directory

The Working with JViews Maps sample is installed here.

Classes Involved

Source Files

Copyright © Rogue Wave Software, Inc. 1997, 2015. All rights reserved. Legal terms.