GLG 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.

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 uses several datasets arranged in multiple layers. The whole world view uses NASA's satellite image of the Earth. When zoomed in on, a more detailed tiled version of the same image is used. For high-level zooms, the Digital Chart of the World vector dataset provides details of political and provincial boundaries, inland water, roads, railroads, populated areas and other coverage. The datasets are organized in layers, with more detailed layers becoming visible as you zoom in.

The Thumbnail Window displays the whole map in the Orthographic Projection (globe view) and shows the outline of the area displayed in the detailed map window. Click here for more information on demo's functionality and user interaction.



Source Code
 
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.

Demo windows and functionality

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

On initial appearance, the detailed map window is zoomed on the United States. Click on the "1:1" button to display the whole world, then use the ZoomTo button to zoom on a different area.
The toolbar buttons display tooltips when the mouse is positioned on top of them. Use directional buttons in the upper left corner to pan 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.

User Interaction

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

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 panned to keep the selected icon visible while 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 tooltips for the toolbar buttons are displayed when the mouse is moved over them.