-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmap.js
64 lines (56 loc) · 1.9 KB
/
map.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
jQuery(function($){
/*
if($(window).width() > $(window).height()){
var map_width_max = ($(window).width() / 3);
var map_height_max = $(window).height() * 0.8;
var map_width = '600px';
var map_height = '600px';
}else{
var map_width_max = $(window).width();
var map_height_max = $(window).height() / 2;
var map_width = '50%';
var map_height = '99.5%';
}*/
var map_width = '500px';
var map_width_max = $(window).width() / 3;
var map_height = '500px';
var map_height_max = $(window).height() * 0.8;
$('#yourImageID').smoothZoom({
width: map_height,
height: map_width,
max_WIDTH: map_width_max,
max_HEIGHT: map_height_max,
pan_BUTTONS_SHOW: "NO",
pan_LIMIT_BOUNDARY: "YES",
button_SIZE: 24,
button_ALIGN: "top right",
zoom_MAX: 200,
border_TRANSPARENCY: 20,
container: 'mapsection',
animation_SMOOTHNESS: 0.5,
animation_SPEED_ZOOM: 0.1,
animation_SPEED_PAN: 0.1,
/******************************************
Enable Responsive settings below if needed.
Max width and height values are optional.
******************************************/
responsive: true,
responsive_maintain_ratio: true
});
});
function Set_MarkerZoom (x_marker,y_marker, markername)
{
$('#yourImageID').smoothZoom('addLandmark',
[
'<div class="item mark" data-show-at-zoom="0" data-position="'+x_marker+','+y_marker+'">\
<div>\
<div class="text">\
<strong>'+markername+'</strong>\
</div>\
<img src="images/marker.png" width="23px" height="32px" alt="mark 1" />\
</div>\
</div>'
]
);
$('#yourImageID').smoothZoom('focusTo', {x:x_marker, y:y_marker, zoom:200, speed:0.1});
}