_mapManager.add(_svgField);
// Initialize a hashtable for our check boxes.
_checkboxes = new Hashtable(3);
// Populates the hashtable, associates listeners with the checkbox
final CheckboxField roadsCheckBox = new CheckboxField("Roads ", true);
final SVGElement roadsGroup =
(SVGElement) _document.getElementById("roads");
_checkboxes.put(roadsCheckBox, roadsGroup);
final CheckboxField railsCheckBox =
new CheckboxField("Railways ", true);
final SVGElement railsGroup =
(SVGElement) _document.getElementById("railways");
_checkboxes.put(railsCheckBox, railsGroup);
final CheckboxField interestsCheckBox =
new CheckboxField("Points of interest ", true);
final SVGElement interestsGroup =
(SVGElement) _document.getElementById("interests");
_checkboxes.put(interestsCheckBox, interestsGroup);
final CheckboxField restaurantCheckBox =
new CheckboxField("Restaurants ", true);
final SVGElement restaurantGroup =
(SVGElement) _document.getElementById("restaurants");
_checkboxes.put(restaurantCheckBox, restaurantGroup);
// Set this class as the handler of the change listeners.
roadsCheckBox.setChangeListener(this);
railsCheckBox.setChangeListener(this);
restaurantCheckBox.setChangeListener(this);
interestsCheckBox.setChangeListener(this);
// Adds the checkboxes to the layout manager.
_checkboxManager.add(roadsCheckBox);
_checkboxManager.add(railsCheckBox);