This is a sample map of Isreal and demonstrates how neighboring countries can be hidden.
We use the following technique to hide regions on our map:
- First we have to define a dataless region color that has to be different from the color for the other visible regions. For example, we can pick “#FCFCFC”.
- The second step is to color all regions that we want to display on our map.
Once we are done, we can apply a CSS rule to hide all unnecessary regions. We have to add the following rule to the CSS of our Map Template:
#{cssid} path[fill="#fcfcfc"],
#{cssid} path[fill="none"]{
display: none;
}
If we click on the “Update Preview” button, the map should have some hidden regions now.
Please note that the hiding only works in region mode. The other modes won’t allow you to add custom colors for regions.
The map configuration can be seen here:
Copy the following text and click on "Import" in the plugin.
Map settings
Name |
Value |
Description |
Region |
Israel |
List with all available regions |
Width |
auto |
Width of the map in pixel. 'Auto' means that the map is centered in the available width. |
Height |
auto |
Height of the map in pixel. 'Auto' means that the map is centered in the available height. |
Display mode |
Regions |
Specifies the display mode of the map. |
Border resolution |
Provinces |
The resolution of the map borders. |
Tooltips |
On |
Allows to display a tooltip for highlighted map elements. |
Tooltips: Trigger |
focus |
The user interaction that causes the tooltip to be displayed. |
Tooltips: Use HTML |
On |
Specifies if the tooltips should use HTML. This allows to customize the tooltips even more. For example, if this property is on, it is possible to display images wihtin the tooltip. |
Map template
CSS |
#{cssid} path[fill="#fcfcfc"], #{cssid} path[fill="none"] {
display: none;
}
#{cssid} .tooltip-title {
white-space: nowrap;
text-align: center;
}
#{cssid} .google-visualization-tooltip {
border-radius: 20px;
}
#{cssid} .google-visualization-tooltip-item {
padding: 0 15px;
} |
HTML |
<div id="{cssid}">
%%map%%
</div> |
JavaScript
Executed when a marker/region is clicked.
Click value can be defined for each map element.
|
|
Map elements (6)
Color |
Name |
Click Value |
|
IL-D |
|
|
IL-JM |
|
|
IL-M |
|
|
IL-TA |
|
|
IL-HA |
|
|
IL-Z |
|
Comments
If you need help or have questions, please leave a comment.