Pre-selecting areas on a map using array of country ISO2 codes

This demo shows how you can "pre-select" countries on a map, if you have a list of their codes as a JavaScript array.

It uses JavaScript Maps' init event to execute a special function which goes through the code list, accesses the relative map object (area) using getObjectById() method, then sets its showAsSelected property.