|
|
Line 1: |
Line 1: |
− | <!DOCTYPE html> | + | <iframe width="500" height="300" scrolling="no" frameborder="no" src="https://www.google.com/fusiontables/embedviz?q=select+col2+from+1uMrN4nBLA6GpfJvYcHq9Nuzwfc_HBuM49Ht6nMyp&viz=MAP&h=false&lat=55.94917296267799&lng=-3.1925288574218484&t=1&z=14&l=col2&y=2&tmplt=2&hml=TWO_COL_LAT_LNG"></iframe> |
− | <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&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>
| |