Skip to content

Instantly share code, notes, and snippets.

@auremoser
Last active September 20, 2015 20:29
Show Gist options
  • Save auremoser/644ff99251f4e17331ec to your computer and use it in GitHub Desktop.
Save auremoser/644ff99251f4e17331ec to your computer and use it in GitHub Desktop.
Storefront Meta Map

This map is a projection experiment with polygon fills from other CartoDB maps, a meta map of the Americas, made for the Storefront for Art and Architecture's art show (Fall 2015) 'Measure'.

CartoDB maps featured are some of the most popular maps made over the past view years, illustrating the variety of maps made possible by open source software. The following SQL changes the projection from standard mercator to azimuthal equidistant.

SELECT ST_Transform(the_geom, 102016) AS the_geom_webmercator FROM table_name

Exhibition install

<!DOCTYPE html>
<html>
<head>
<title>Measure Map</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" />
<!-- This map is a projection experiment with polygon fills from other CartoDB maps, a meta map of the Americas. -->
<link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v3/themes/css/cartodb.css" />
<style>
html, body, #map {
height: 100%;
padding: 0;
margin: 0;
}
</style>
</head>
<body>
<div id="map"></div>
<!-- include cartodb.js library -->
<script src="http://libs.cartocdn.com/cartodb.js/v3/cartodb.js"></script>
<script src="main.js"></script>
</body>
</html>
window.onload = function() {
var vizjson_url = 'https://team.cartodb.com/u/aureliamoser/api/v2/viz/57fd4028-3d3c-11e5-8e47-0e9d821ea90d/viz.json'; // <-- Paste viz.json URL between quotes
cartodb.createVis(map, vizjson_url) // <-- Change map_id to match your id in html
.done(function(vis, layers) {
// do stuff
console.log("Map successfully created");
})
.error(function(err) {
// report error
console.log("An error occurred: " + err);
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment