Last active
February 6, 2016 12:33
-
-
Save ernesmb/eb484b19f26db188c371 to your computer and use it in GitHub Desktop.
Sphere Robinson vs. Web Mercator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Title</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" /> | |
<link rel="stylesheet" href="https://cartodb-libs.global.ssl.fastly.net/cartodb.js/v3/3.15/themes/css/cartodb.css" /> | |
<script src="https://cartodb-libs.global.ssl.fastly.net/cartodb.js/v3/3.15/cartodb.js"></script> | |
<style> | |
html, body, #map { | |
height: 100%; | |
padding: 0; | |
margin: 0; | |
} | |
</style> | |
</head> | |
<body> | |
<div id="map"></div> | |
<script> | |
var map; | |
function main() { | |
map = L.map('map', { | |
zoomControl: true, | |
center: [36,0], | |
zoom:2, | |
}); | |
//add CartoDB code | |
cartodb.createLayer(map, { | |
user_name:'ernestomb', | |
type: 'cartodb', | |
sublayers:[{ | |
sql:'SELECT ST_Transform(the_geom, 53030) AS the_geom_webmercator FROM world_table', | |
cartocss:'Map {background-color:#000;} #world_table{polygon-fill:#2C82C9;}' | |
}, | |
{ | |
sql:'SELECT the_geom_webmercator FROM world_table', | |
cartocss:'#world_table{polygon-fill:#666;polygon-opacity:0.2;line-width:0.5;line-color:#FFF;line-opacity:0.7}'}] | |
},{https:true}).addTo(map); | |
} | |
window.onload = main; | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment