Sha256: 63a9b9ecd37dcd61894ba998c0a3149abd4b5cb689e74f422165c588851fb45a

Contents?: true

Size: 1.78 KB

Versions: 2

Compression:

Stored size: 1.78 KB

Contents

<?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 - Europe Map</title>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">

    <link href="../dist/jqvmap.css" media="screen" rel="stylesheet" type="text/css">

    <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.europe.js" charset="utf-8"></script>

    <script type="text/javascript">
      function touch_detect() {
        return 'ontouchstart' in window || 'onmsgesturechange' in window || navigator.msMaxTouchPoints > 0;
      }

      jQuery(document).ready(function () {
        jQuery('#vmap').vectorMap({
          map: 'europe_en',
          enableZoom: false,
          showTooltip: false,
          onRegionClick: function (element, code, region) {
            if (!touch_detect()) {
              // we're not on a mobile device, handle the click
              var message = 'You clicked "' + region + '" which has the code: ' + code.toUpperCase();
              alert(message);
            }
          },
          onRegionOver: function (element, code, region) {
            if (touch_detect()) {
              /// we're not on a mobile device, handle the click
              var message = 'You clicked "' + region + '" which has the code: ' + code.toUpperCase();
              alert(message);
            }
          }
        });
      });
    </script>
  </head>

  <body>
    <div id="vmap" style="width: 680px; height: 520px;"></div>
  </body>
</html>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rails_modular_admin-1.0.0 app/assets/node_modules/jqvmap/examples/touch_detect.html
rails_modular_admin-0.4.0 app/assets/node_modules/jqvmap/examples/touch_detect.html