Requesting a Legend Using JavaScript API Components

The JavaScript API includes a set of browser-based user interface components for easily embedding maps and other location-based capabilities in web pages. Built entirely in JavaScript, the controls work without the need for any browser plug-ins and without having to write any server-side code.

One of the JavaScript API components, the LegendControl, enables you to easily add a legend for your map. When your map is displayed in the browser, the LegendControl calls on the Mapping Service to provide the legend data for the map.

The JavaScript API is included when you install the Spatial Module web services. For more information on the JavaScript API and the components, see What is the JavaScript API?. For information on the JavaScript API, see the