xxxxxxxxxx
<html>
<head>
<link rel="stylesheet" href="https://libs.cartocdn.com/cartodb.js/v2/themes/css/cartodb.css" />
<script src="https://libs.cartocdn.com/cartodb.js/v2/cartodb.js"></script>
<!--[if lte IE 8]>
<link rel="stylesheet" href="https://libs.cartocdn.com/cartodb.js/v2/themes/css/cartodb.ie.css" />
<![endif]-->
<style>
html, body {padding: 0; margin: 0;}
#cartodb-map { width: 100%; height:100%; background: black;}
</style>
<script>
var map;
function init(){
// initiate leaflet map
map = new L.Map('cartodb-map', {
center: [0,0],
zoom: 2
})
L.tileLayer('https://dnv9my2eseobd.cloudfront.net/v3/cartodb.map-4xtxp73f/{z}/{x}/{y}.png', {
attribution: 'Mapbox <a href="https://mapbox.com/about/maps" target="_blank">Terms & Feedback</a>'
}).addTo(map);
var layerUrl = 'https://examples-beta.cartodb.com/api/v1/viz/936/viz.json';
var layerOptions = {
query: "SELECT * FROM {{table_name}} where adm0_a3 = 'USA'",
tile_style: "#{{table_name}}{marker-fill: #109DCD; marker-width: 5; marker-line-color: white; marker-line-width: 0;}"
}
cartodb.createLayer(map, layerUrl, layerOptions)
.on('done', function(layer) {
map.addLayer(layer);
}).on('error', function() {
//log the error
});
}
</script>
</head>
<body onload="init()">
<div id='cartodb-map'></div>
</body>
</html>
Modified http://libs.cartocdn.com/cartodb.js/v2/cartodb.js to a secure url
https://libs.cartocdn.com/cartodb.js/v2/cartodb.js