-
Notifications
You must be signed in to change notification settings - Fork 4
Random Test Page
Frymasterspeck edited this page Oct 15, 2014
·
3 revisions
Wanted to see if I can embed this fusion table map.
<iframe width="500" height="300" scrolling="no" frameborder="no" src="https://www.google.com/fusiontables/embedviz?q=select+col2+from+1IkuVd-MNy847sIrrjZwCvpHX7Fu3TJIId1-Ht3DM&viz=MAP&h=false&lat=41.818005519700186&lng=-71.41622413063045&t=1&z=13&l=col2&y=2&tmplt=2&hml=ONE_COL_LAT_LNG"></iframe>[https://www.google.com/fusiontables/embedviz?q=select+col2+from+1IkuVd-MNy847sIrrjZwCvpHX7Fu3TJIId1-Ht3DM&viz=MAP&h=false&lat=41.818005519700186&lng=-71.41622413063045&t=1&z=13&l=col2&y=2&tmplt=2&hml=ONE_COL_LAT_LNG The map link]
HTML/JavaScript
<title>Providence Voting Precincts - 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(41.818005519700186, -71.41622413063045), zoom: 13, mapTypeId: google.maps.MapTypeId.ROADMAP }); map.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(document.getElementById('googft-legend-open')); map.controls[google.maps.ControlPosition.RIGHT_BOTTOM].push(document.getElementById('googft-legend')); layer = new google.maps.FusionTablesLayer({ map: map, heatmap: { enabled: false }, query: { select: "col2", from: "1IkuVd-MNy847sIrrjZwCvpHX7Fu3TJIId1-Ht3DM", 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>