labels.html
3.63 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>JQVMap - USA Map</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<!-- Mobile Specific Meta Tags -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link href="../dist/jqvmap.css" media="screen" rel="stylesheet" type="text/css"/>
<style>
html, body {
padding: 0;
margin: 0;
width: 100%;
height: 100%;
}
#vmap {
width: 100%;
height: 100%;
background-color: red;
-webkit-tap-highlight-color: rgba(0,0,0,0);
}
/* Setup basic CSS for Label */
.jqvmap-pin {
font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
cursor: default;
pointer-events: none;
}
/* Hide Whichever Labels you want */
#jqvmap1_ri_pin, #jqvmap1_dc_pin, #jqvmap1_de_pin, #jqvmap1_md_pin {
display: none;
}
/* Reposition Labels that are not quite right ( labels are centered in shape, and sometimes need tweaking ) */
#jqvmap1_ak_pin {
margin-top: -2%;
}
#jqvmap1_ca_pin {
margin-left: -2%;
}
#jqvmap1_ct_pin {
margin-top: -0.25%;
margin-left: -0.25%;
}
#jqvmap1_fl_pin {
margin-left: 5%;
}
#jqvmap1_id_pin {
margin-top: 3%;
margin-left: -1%;
}
#jqvmap1_ky_pin {
margin-left: 2%;
}
#jqvmap1_la_pin {
margin-left: -2%;
}
#jqvmap1_mi_pin {
margin-top: 4%;
margin-left: 3%;
}
#jqvmap1_ma_pin {
margin-top: -0.25%;
}
#jqvmap1_mn_pin {
margin-top: 2%;
margin-left: -2%;
}
#jqvmap1_nh_pin {
margin-top: 1%;
margin-left: -0.25%;
}
#jqvmap1_nj_pin {
margin-top: 1%;
}
#jqvmap1_ok_pin {
margin-left: 2%;
}
#jqvmap1_va_pin {
margin-left: 2%;
}
#jqvmap1_wv_pin {
margin-left: -1%;
margin-top: 1%;
}
/* Add responsibe support to resize labels for difference screen sizes */
@media only screen and (min-width: 320px) {
.jqvmap-pin {
font-size: 6px;
}
}
@media only screen and (min-width: 480px) {
.jqvmap-pin {
font-size: 8px;
}
}
@media only screen and (min-width: 640px) {
.jqvmap-pin {
font-size: 10px;
}
}
@media only screen and (min-width: 800px) {
.jqvmap-pin {
font-size: 12px;
}
}
@media only screen and (min-width: 1024px) {
.jqvmap-pin {
font-size: 14px;
}
}
</style>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="../dist/jquery.vmap.js"></script>
<script type="text/javascript" src="../dist/maps/jquery.vmap.usa.js" charset="utf-8"></script>
<script>
jQuery(document).ready(function () {
jQuery('#vmap').vectorMap({
map: 'usa_en',
borderWidth: 0.25,
showLabels: true
});
});
</script>
</head>
<body>
<div id="vmap"></div>
</body>
</html>