This example shows how to change the default mouse cursor for a map with markers. If you move the mouse cursor on one of the markers, you will see that it changes to a crosshair cursor. This can be achieved by adding the following lines to the map template of a given map:
#{cssid} circle {
cursor: crosshair;
}
There are also other values for the cursor property:
CSS |
Example Map |
default – Without adding any CSS |
|
#{cssid} circle {
cursor: pointer;
}
|
|
#{cssid} circle {
cursor: help;
}
|
|
#{cssid} circle {
cursor: crosshair;
}
|
|
There are even more values for the cursor property, but the ones from above are probably the most important. The map configuration of the first map can be seen here:
Copy the following text and click on "Import" in the plugin.
Map settings
Name |
Value |
Description |
Region |
Poland |
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 |
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} circle {
cursor: crosshair;
} |
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 (2)
Color |
Name |
Click Value |
|
Warsaw |
|
|
Wroclaw |
|
Comments
If you need help or have questions, please leave a comment.