Add U.S. Territories | Documentation

While the United States is composed of 50 states, it also includes a few U.S. territories and commonwealths.  Some of these, such as Puerto Rico are very well known and have even considered becoming a U.S. state.  Others are smaller and less well known, such as the Northern Mariana Islands.  However, if you are displaying statistics or happen to do business in one of these locations (travel businesses), then you may want to include them in your interactive map.  While our JavaScript US map does not show these locations by default, they are included in the map and can be made visible by a simple edit to the mapdata.js file.  The following locations are available:

  • Guam
  • U.S. Virgin Islands
  • Puerto Rico
  • Northern Mariana Islands
  • American Samoa

To add one, or more, of these islands to the map,  go to the end of the state_specific section of your mapdata.js file.  You will see the following:

GU: {
  name: 'Guam',
  description: 'default',
  color: 'default',
  hover_color: 'default',
  url: 'default',
  hide: 'yes'
},
VI: {
  name: 'Virgin Islands',
  description: 'default',
  color: 'default',
  hover_color: 'default',
  url: 'default',
  hide: 'yes'
},
PR: {
  name: 'Puerto Rico',
  description: 'default',
  color: 'default',
  hover_color: 'default',
  url: 'default',
  hide: 'yes'
},
MP: {
  name: 'Northern Mariana Islands',
  description: 'default',
  color: 'default',
  hover_color: 'default',
  url: 'default',
  hide: 'yes'
},
AS: {
  name: 'American Samoa',
  description: 'default',
  color: 'default',
  hover_color: 'default',
  url: 'default',
  hide: 'yes'
}

Simply replace hide: 'yes' with hide: 'no' and that territory will appear in your interactive map. This hide attribute actually works for all states. So, if you don't like Alaska and Hawaii hanging around in Mexico, you can add hide: 'yes' as a property to AK and HI and both states will disappear from the interactive map.

If you are using the online tool, you can easily unhide the territories by add 'no' to the hide column.

Please note that latitude and longitude markers do not work correctly with territories.  Also, if you need to show a U.S. territory that we have not included, please get in touch with us.

© Simplemaps.com 2010-2017 | Home | License | Privacy Policy | Releases | Testimonials | Resources | Documentation
Formerly FlashUSAmap.com and Flashworldmap.com