-
Notifications
You must be signed in to change notification settings - Fork 677
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #185 from manifestinteractive/issue-84
Adds a `showLabels` config option to show labels by default
- Loading branch information
Showing
6 changed files
with
237 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
<?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; | ||
} | ||
|
||
/* 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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters