Difference between revisions of "Edinburgh Lobbying Map"

From Powerbase
Jump to: navigation, search
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<!DOCTYPE html>
+
{{#display_map:|center=edinburgh|zoom=11|fusiontables=1KUwKWx1EIPlnRELtw1snli04Us6vQpsiYULFzPSm}}
<html>
 
<head>
 
<meta name="viewport"></meta>
 
<title>Edinburgh - Google Fusion Tables</title>
 
<style type="text/css">
 
html, body, #googft-mapCanvas {
 
  height: 300px;
 
  margin: 0;
 
  padding: 0;
 
  width: 500px;
 
}
 
</style>
 
 
 
<script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=false&amp;v=3"></script>
 
 
 
<script type="text/javascript">
 
  function initialize() {
 
    google.maps.visualRefresh = true;
 
    var isMobile = (navigator.userAgent.toLowerCase().indexOf('android') > -1) ||
 
      (navigator.userAgent.match(/(iPod|iPhone|iPad|BlackBerry|Windows Phone|iemobile)/));
 
    if (isMobile) {
 
      var viewport = document.querySelector("meta[name=viewport]");
 
      viewport.setAttribute('content', 'initial-scale=1.0, user-scalable=no');
 
    }
 
    var mapDiv = document.getElementById('googft-mapCanvas');
 
    mapDiv.style.width = isMobile ? '100%' : '500px';
 
    mapDiv.style.height = isMobile ? '100%' : '300px';
 
    var map = new google.maps.Map(mapDiv, {
 
      center: new google.maps.LatLng(55.94917296267799, -3.1925288574218484),
 
      zoom: 14,
 
      mapTypeId: google.maps.MapTypeId.ROADMAP
 
    });
 
 
 
    layer = new google.maps.FusionTablesLayer({
 
      map: map,
 
      heatmap: { enabled: false },
 
      query: {
 
        select: "col2",
 
        from: "1uMrN4nBLA6GpfJvYcHq9Nuzwfc_HBuM49Ht6nMyp",
 
        where: ""
 
      },
 
      options: {
 
        styleId: 2,
 
        templateId: 2
 
      }
 
    });
 
 
 
    if (isMobile) {
 
      var legend = document.getElementById('googft-legend');
 
      var legendOpenButton = document.getElementById('googft-legend-open');
 
      var legendCloseButton = document.getElementById('googft-legend-close');
 
      legend.style.display = 'none';
 
      legendOpenButton.style.display = 'block';
 
      legendCloseButton.style.display = 'block';
 
      legendOpenButton.onclick = function() {
 
        legend.style.display = 'block';
 
        legendOpenButton.style.display = 'none';
 
      }
 
      legendCloseButton.onclick = function() {
 
        legend.style.display = 'none';
 
        legendOpenButton.style.display = 'block';
 
      }
 
    }
 
  }
 
 
 
  google.maps.event.addDomListener(window, 'load', initialize);
 
</script>
 
</head>
 
 
 
<body>
 
  <div id="googft-mapCanvas"></div>
 
</body>
 
</html>
 

Latest revision as of 08:58, 28 September 2015

{{#display_map:|center=edinburgh|zoom=11|fusiontables=1KUwKWx1EIPlnRELtw1snli04Us6vQpsiYULFzPSm}}