State-specific Settings | Documentation

Note: Depending on the map, state could refer to a state, province or country.

Properties (these overwrite the properties in the main settings)
name Primarily for identification purposes. However, you can overwrite a state's name.
description This will fill up the popup and can include HTML/CSS. If it exists, it will overwrite main_settings.state_description.
color The state's color. If it exists, it will overwrite main_settings.state_color.
hover_color The state's hover_color. If it exists, it will overwrite main_settings.state_hover_color.
url The url when the state is clicked. (e.g. 'http://simplemaps.com'). If it exists, it will overwrite main_settings.state_url.
hide 'yes' makes the state invisible.
zoomable 'yes' will zoom into the state upon click instead of redirecting to the url. If it exists, it will overwrite main_settings.all_states_zoomable
zoom_percentage The percentage of the canvas that a zoomed state should take up. (e.g. '.9', would create a 10% border around the zoomed state).
inactive 'yes' will make hovering or clicking on a state have no effect. If it exists, it will overwrite main_settings.all_states_inactive
popup Override main_settings.popups for this state.
border_color The state's border color. Note, state borders overlap, so you should use the same color for states that border each other. This is best used for small islands.
level The z-index position of the state. Larger numbers on top. (defaults: states: 0, lines: 2, labels: 3, locations: 5).
Background Image (use a background image instead of color or hover_color, no IE7/IE8 support)
image_url The url of the background image [e.g. 'https://simplemaps.com/static/img/frog.png'].
image_size The size of the image. If:
0 > image_size < 1 ... it will be treated as a fraction of the state's bounding box.
image_size > 1 ... it will be treated as the width, in pixels, of the image.
image_size is 'auto' ... it will be chosen automatically based on image_position.
image_position By default, 'center', places the image in the center and will always fill the state. 'manual' allows you to set placement via image_x and image_y. 'repeat' will repeat as image_size allows. ['center', 'repeat', 'manual']
image_x If image_position: 'manual', adjust the horizontal placement of the image as a fraction of the state's bounding box width. [0-1]
image_y If image_position: 'manual', adjust the vertical placement of the image as a fraction of the state's bounding box height. [0-1]
image_color If the aspect ratio of the image does not match the aspect ratio of the state's bounding box (and the image isn't large enough), some of the state will remain uncovered. This overwrites the default background color of color. [e.g. '#ffffff']

The above can also differ when the state is hovered over. In other words, the following analogous properties are also valid: image_hover_url, image_hover_size, image_hover_position, image_hover_x, image_hover_y, and image_hover_color.

These properties can be made defaults by adding them to the main_settings with the prefix 'state_'. [e.g. state_image_url, state_image_hover_url]

Note: pill's will not inherit state background images. They will use the state color and hover_color.

Home | License | Privacy | Releases | Testimonials | Resources | Documentation | Order Lookup | All Maps | FAQs
Formerly FlashUSAmap.com and FlashWorldMap.com
SimpleMaps.com is a product of Pareto Software, LLC. © 2010-2024.