I am trying to use the image mapper library to do a mapping of a map, however I can't seem to get the basic features working.
This is the initiation of my scripts
<script src="assets/js/jquery.min.js"></script>
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="assets/js/jquery.imagemapster.js"></script>
<script>
$(document).ready(function () {
$('.carousel').carousel();
$('central').mapster('tooltip');
$('#singaporemap').mapster({
showToolTip: true,
noHrefIsMask: false,
fillOpacity: 0.7,
strokeWidth: 2,
stroke: true,
strokeColor: 'ff0000',
mapKey: 'data-key',
singleSelect: true,
onClick: function (e) {
$(this).mapster('tooltip');
alert('something clicked');
},
areas: [
{
key: 'central',
toolTip: 'central !'
}
]
});
});
</script>
And where I create the map:
<div class="col-xs-12" style="height: 68%; width: 100%; margin-left: auto; margin-right: auto;">
<img src="assets/img/singapore_outline_map.png" id="singaporemap" usemap="#singapore" style="height: 487px; width: 740px" />
<map name="singapore">
<area shape="poly" data-key="central" coords="206,141,397,136,444,302,207,238" href="#" alt="Central">
</map>
</div>
I have tried many different codes, most of the code in the initializing doesn't work. My area isn't filling, my onClick doesn't give any alerts, and the area doesn't display tool-tips. Below is the results when I clicked the area I selected