The Map Component

The Map component is the primary interface between the application and the spatial data represented by the map. Most components either display information about the map or allow the user to interact with the map in some way.

The Map component supports the following API:

A Map component can have a default MapDefinition that is automatically loaded when the application is loaded. But it is not mandatory to specify a default map. When no default map is specified, the Map component is still initialized. The MapDefinition will then be loaded in response to another component (such as the MapMenu component) or some application-specific code. Regardless of how it happens, when a MapDefinition has been loaded, the Map component will trigger a MAP_LOADED event. Most components are not useful if there is no map loaded, so they use the MAP_LOADED event to determine when they should be enabled. This means that most components will appear initially disabled until the map has been loaded. There are some notable exceptions, including the Map Menu component which is used to provide a drop-down menu of MapDefinitions that the user can pick from.

Once the Map is loaded, the following events may be triggered: