Skip to content

Instantly share code, notes, and snippets.

@Xatpy
Last active August 29, 2015 14:14
Show Gist options
  • Save Xatpy/1699b46112d992f11919 to your computer and use it in GitHub Desktop.
Save Xatpy/1699b46112d992f11919 to your computer and use it in GitHub Desktop.
Poistron basemap HTTPS
<!DOCTYPE html>
<html>
<head>
<title>Positron HTTPS| CartoDB.js</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<link rel="shortcut icon" href="http://cartodb.com/assets/favicon.ico" />
<style>
html, body, #map {
height: 100%;
padding: 0;
margin: 0;
}
</style>
<link rel="stylesheet" href="https://cartodb-libs.global.ssl.fastly.net/cartodb.js/v3/3.11/themes/css/cartodb.css" />
</head>
<body>
<div id="map"></div>
<!-- include cartodb.js library -->
<script src="https://cartodb-libs.global.ssl.fastly.net/cartodb.js/v3/3.11/cartodb.js"></script>
<script>
function main() {
var layer = L.tileLayer('https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png',{
attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, &copy; <a href="http://cartodb.com/attributions">CartoDB</a>'
});
var map = L.map('map', {
scrollWheelZoom: false,
center: [40.7127837, -74.0059413],
zoom: 2
});
map.addLayer(layer);
}
// you could use $(window).load(main);
window.onload = main;
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment