Advanced Customization

When creating a map, you have a lot of customization options on the administration panel, including: background color, border color and width, inactive regions color, markers size and color and the active regions color. These are the options that the Google Geochart API provides. However, advanced users will be able to extend this customization features.

If you have some knowledge of CSS, you will be able to customize the maps even further, creating css rules for the maps you created.

You will have to place the CSS rules in your theme CSS, or embed them on the post or page where your map will show.

For each of the examples here, you should take in consideration that you should change the #map_canvas_ID for your map ID. From version 1.5.5 you should use #iwm_map_canvas instead of #map_canvas (that you should use in case you have an older version).

Country borders color and mouse cursor

Continents Map

#map_canvas_21 path {
stroke-width:1; /* control the countries borders width */
stroke:#6699cc; /* choose a color for the border */
cursor:pointer; /* display the pointer when the map hovers the map. */

Hover effect

World Visits

The hover effect is created with a class and an advanced selector that creates a rule to fill with the color red the regions that are NOT colored #f5f5f5, the color that was chosen for the inactive regions.

#map_canvas_14 path:not([fill^=”#f5f5f5″]):hover {

Marker with point cursor and different hover effects

Coordinates Example

#map_canvas_26 circle {
stroke-width:0; /* control the countries borders width */
cursor:pointer; /* display the pointer when the map hovers the map. */

#map_canvas_26 circle:hover {
stroke-width:3; /* control the countries borders width */
stroke:#FFFFFF; /* control the countries borders color */
cursor:pointer; /* display the pointer when the map hovers the map. */
fill:#6699cc; /* control the fill color of the marker */

Changing the default crop

[More detailed information about this technique here] [ATTENTION: THIS COULD AFFECT THE RESPONSIVE FEATURES]

Duplicate of Africa

The default area that the plugin displays for some countries is very wide sometimes. We can change this by playing around with some values:

#iwm_map_canvas {

#map_canvas #map_canvas_47 {

You can play around with values and with the size of the map to achieve what you need.


Background Fill in Markers Mode

(For better results you can deactivate the ‘Interactivity > Active’ option, this way only the markers will be interactive and the hover regions won’t work)


#map_canvas_18 path:nth-child(111) {

This is a bit tricky to achieve. The theory is that you find the number of the shape of the region you want to color and use it with this advanced CSS selector.

Italy Markers

#map_canvas_44 path:nth-child(232),
#map_canvas_44 path:nth-child(234),
#map_canvas_44 path:nth-child(235),
#map_canvas_44 path:nth-child(236) {

In the future I will try to document this trick a bit further, having a table of matching numbers for each state and countries that I’ve found out.

I use the firefox/chrome extension ‘Firebug‘ to find out the number. Check this image below with some instructions.

(click to enlarge)


Advanced Italy Example with multiple techniques


Tuscany Example
Code used for this example:
#iwm_map_canvas {
}#map_canvas_52 {
}#map_canvas_52 path:nth-child(254),
#map_canvas_52 path:nth-child(253) {
}Screenshot of Map Administration:tuscany