The map variable describes the current map. It is only available in the Reader designer and Topic template designer.
map contains the response body for the Get a map web service for the currently open document. It gives access to a map's metadata.
The map variable also includes the following JavaScript methods:
| Method | Description |
|---|---|
map.getRating() |
Returns information about the rating given to the current map. |
map.rate() |
Allows designers to rate a map. |
map.unrate() |
Allows designers to unrate a map. |
map.sendFeedback() |
Allows designers to send feedback about a map. |
To see the content of the map variable in the browser console, enter the following in the JavaScript section of a Custom component, then select Run:
console.log(JSON.stringify(map, null, 2));