Home | AJAX Demos | Java Demos | Products

GIS Map Server and Air Traffic Demo:
Add Dynamics to Your Maps!

This demo presents an example of using the GLG Map Server integrated inside of a GLG drawing as a GLG GIS Object. The Map Server is used to generate the map of the viewed area, while the Toolkit is used to display dynamic icons on top of the map, handle user interaction and automatically generate Map Server requests to re-generate the image when the map is panned or zoomed.

The demo uses several datasets arranged in multiple layers, automatically switching to more detailed datasets as needed when the map is zoomed in. Click here for more information on the datasets used in the demo.

  • Overview
  • User Interface

  • Applet Source Code

    Overview

    The demo uses two map windows. The main window shows a detailed map which can be zoomed and panned. The thumbnail window displays the whole world in the Orthographic Projection (a globe view) and shows the outline of the area displayed in the detailed map window.

    Each moving icon is represented by a collection of dynamic GLG objects which may change shape, label, colors and other attributes to reflect the state of the object they represent. Each icon can be selected with the mouse and displays a tooltip with detailed information when the mouse is moved over it.

    The demo starts with the map of the whole world, then zooms on the United States to show more details. The map can be zoomed with the zoom buttons located in the toolbar. The toolbar displays tooltips when the mouse is moved over toolbar buttons. The directional buttons in the upper left corner may be used to scroll the map.

    In addition to the moving icons, the map also contains several static city icons implemented as GLG objects (square green dots). These city icons are different from the city markers generated in the map image by the Map Server. The city icons generated by the Map Server are part of the image, can not be selected, and can be switched on or off only by changing the visibility of the city layer and re-generating the image. The city icons implemented as GLG objects, on the other hand, can be switched dynamically on or off, can change color and other attributes, and may be selected with the mouse. They also display tooltips with detailed information when the mouse moves over them and may be used by an application to annotate special points of interests.

    Dataset Information

    The demo uses several datasets arranged in multiple layers.

  • The NASA's satellite image of the Earth is used for the view of the whole world.
  • A higher-resolution tiled version of the image is used when the map is zoomed in.
  • The Digital Chart of the World (VMAP0) vector dataset is used for high-level zooms.

  •  The US Census Tiger dataset is used for the street-level zooms in the US area.
  • The DCW dataset provides details of political and provincial boundaries, inland water, roads, railroads, populated areas and other coverage. The DCW and Tiger datasets are organized in such a way that more detailed layers are automatically activated depending on the zoom level, to display more details as the map is zoomed in.

    User Interface

    Move the mouse over an icon to display a tooltip with icon information.

    Move the mouse over either map window to display the lat/lon coordinates of the cursor in the lower right corner of the main map.

    Click on the moving icon to select it (an application may also open another URL with detailed information for the selected icon).

    Click on the left-most button in the toolbar to "lock" on the selected icon, so that the map is automatically panned to keep the selected icon visible as it is moving.

    The toolbar also contains buttons for switching various layers on and off, changing plane icon size, as well as zooming and panning controls. The toolbar displays tooltips when the mouse is moved over toolbar buttons.

    NOTE: To run the demo locally from your own server, the GLG Map Server has to be setup on that server. If the map server is not set up, the map image will be missing.