imagemap is a Javascript library for work with image as map. jQuery is required. The goal is to create a simple core library that can be customized and extended.
0.0.5.0
- Import JQuery
<script type="text/javascript" src="jquery.min.js"></script>
- Import ImageMap javascript file
<script type="text/javascript" src="imageMap.js"></script>
- Creating a map
var map = new imagemap.Map({
container: 'map',
image: 'path/to/image/map_image.png',
size: [4660, 3050],
zoom: 9,
nivel: 19
});
Atribute | Explanation |
container | Div to create map |
image | Path to image |
size | Imagem original size [ W, H ] |
zoom | Zoom imagem start |
nivel | Max zoom level |
- Creating a marker
var marker1 = map.addMarker({
image: 'marker_red.png',
position: [680, 720]
});
Atribute | Explanation |
image | Makert path to image |
position | Marker position on original imagem [ Left, Top ] |
width | Marker width |
height | Marker height |
reference | Users value control |
description | Users description |
onclick | Marker onclick event |
Fernando Moralles