Created
March 13, 2016 18:55
-
-
Save juanignaciosl/c4c4fcc5ecc514a7ec34 to your computer and use it in GitHub Desktop.
bigmac-map - Work time to buy a Big Mac
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
Work time to buy a Big Mac |
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
{ | |
"env": { | |
"browser": true, | |
"node": false, | |
}, | |
"rules": { | |
"quotes": [2, "single"], | |
} | |
} |
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
node_modules/ | |
*.log | |
.DS_Store |
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
html, body, #map { | |
height: 100%; | |
width: 100%; | |
padding: 0; | |
margin: 0; | |
} |
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 lang="en"> | |
<head> | |
<title>Work time to buy a Big Mac</title> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> | |
<link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v3/3.15/themes/css/cartodb.css" /> | |
<link rel="stylesheet" href="index.css" media="screen"> | |
<link rel="shortcut icon" href="favicon.ico" /> | |
<script src="//localhost:9091"></script> | |
</head> | |
<body> | |
<div id="map"></div> | |
<script src="http://libs.cartocdn.com/cartodb.js/v3/3.15/cartodb.js"></script> | |
<script type="text/javascript" src="index.js"></script> | |
</body> | |
</html> |
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
;(function() { | |
function main() { | |
cartodb.createVis('map', 'http://documentation.cartodb.com/api/v2/viz/2b13c956-e7c1-11e2-806b-5404a6a683d5/viz.json', { | |
}) | |
.done(function(vis, layers) { | |
// layer 0 is the base layer, layer 1 is cartodb layer | |
// setInteraction is disabled by default | |
layers[1].setInteraction(true); | |
layers[1].on('featureOver', function(e, latlng, pos, data) { | |
}); | |
// you can get the native map to work with it | |
var map = vis.getNativeMap(); | |
}) | |
.error(function(err) { | |
console.log(err); | |
}); | |
} | |
window.onload = main; | |
})(); |
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
{ | |
"name": "bigmac-map", | |
"version": "0.0.1", | |
"description": "Work time to buy a Big Mac", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1", | |
"build": "true ", | |
"livereload": "live-reload --port 9091 .", | |
"open": "opener http://localhost:9090", | |
"serve": "http-server -s -p 9090 .", | |
"dev": "npm run build -s && (sleep 1 && npm run open -s) & npm run livereload -s & npm run serve", | |
"gist": "echo 'Work time to buy a Big Mac' > '..bigmac-map' && gistup && gistup-rename 'bigmac-map - Work time to buy a Big Mac'" | |
}, | |
"repository": { | |
"type": "git", | |
"url": "git+https://github.com/nerik/generator-cartodb.git" | |
}, | |
"keywords": [ | |
"cartodb" | |
], | |
"author": "nerik", | |
"license": "ISC", | |
"bugs": { | |
"url": "https://github.com/nerik/generator-cartodb/issues" | |
}, | |
"homepage": "https://github.com/nerik/generator-cartodb#readme", | |
"devDependencies": { | |
"http-server": "^0.8.5", | |
"live-reload": "^1.1.0", | |
"opener": "^1.4.1", | |
"gistup": "^0.1.2", | |
"eslint": "^2.0.0" | |
}, | |
"dependencies": { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment