This is an interactive map of France, Spain and Portugal which is focused on the mainland:
Check out the version with islands.
If you want to use this map, you can simply click on the download button below. This map mainly uses two techniques: CSS for a custom crop and CSS to hide regions. If you import the map, you will find the CSS in the map template.
The CSS will manually hide all elements within the SVG graphic that belong to countries other than France, Spain and Portugal. The map configuration can be found here:
Copy the following text and click on "Import" in the plugin.
Map settings
Name |
Value |
Description |
Region |
Southern Europe |
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 |
Markers |
Specifies the display mode of the map. |
Border resolution |
Countries |
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 |
Off |
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 |
/* Changing the default cursor */
#{cssid} circle {
cursor: pointer;
}
/* CSS for custom crop: */
#{cssid} {
overflow: hidden;
position: relative;
width: 100%;
}
#{cssid}:after {
content: "";
display: block;
padding-top: 61.7%;
}
#{cssid} .map_wrap {
width: 175%;
height: 160%;
margin-left: -39%;
margin-top: -4%;
position: absolute;
left: 0;
top: 0;
bottom: 0;
right: 0;
}
#{cssid} svg g:nth-child(1) > g:nth-child(1) > path {
display: none;
}
#{cssid} svg g:nth-child(1) > g:nth-child(1) > path:nth-child(n+5):nth-child(-n+16),
#{cssid} svg g:nth-child(1) > g:nth-child(1) > path:nth-child(n+120):nth-child(-n+131),
#{cssid} svg g:nth-child(1) > g:nth-child(1) > path:nth-child(n+246):nth-child(-n+253) {
display: block;
} |
HTML |
<div id="{cssid}_click_value">
</div>
<div id="{cssid}">
<div class="map_wrap">
%%map%%
</div>
</div> |
JavaScript
Executed when a marker/region is clicked.
Click value can be defined for each map element.
|
jQuery("#" + cssid + "_click_value").html(click_value); |
Map elements (2)
Color |
Name |
Click Value |
|
Madrid |
|
|
Paris |
|
Comments
If you need help or have questions, please leave a comment.