It is possible to create GUI-Classes that take any two CCG-objects
and displays the first component at a given location and pops-up the
second component, if mouse moves (or upon mouse click) on the first
LM_Obj1 = new LandMarkTemplete
gives the coordinates for the CCG1's
is presented upon mouse action. (Please move mouse
are usually set to ZERO, so that parent can determine the location
//The map is drawn on a "canvas"
(please click here for a
// The following statement instantiates the Canvas's
CanvasTemplate CanvasObj1 = new CanvasTemplate (x_size, y_size,
// Create the
back-ground Vector map for any country (or City/State).
= new MapComponentFactory("USA",
//Now, to add each
component to the Canvas's Object, use its methods. For example:
CanvasObj1.addComponent ( MAP_Obj,
0, 0); // Add
map as the background
( LM_Obj1, loc_x1, loc_y1);
// Add first landmark
( LM_Obj2, loc_x2, loc_y2); //
Add second landmark
( LM_Obj3, loc_x3, loc_y3); //
Repeat it to add landmarks
Note: The order is important.
First component is shown at the bottom of the SVG-image stack. If we add
the MAP_Obj last, all the landmark components added before will be hidden
behind the Map.
The above SVG example showed three types of Landmark GUI-Classes:
A pop-up information component (Auto Hide, upon
A pop-up window to show the information subcomponent.
A info-component to be displayed at a
specific location away from the map.
Note: In the above example, we have used simple
Circle or Squire for the Land Marks, but they could be complex components,
having 10 subcomponents and thousands of lines of code.
Usually the GUI-classes do not restrict the
complexity of the subcomponents. There is no technical limitation that
require us to restrict the complexity of the subcomponents. However, some
cases the extra testing effort may not give any advantage, if user always
use certain types of components.