Usually, you can style your maps with CartoCSS in an easy way by using constraints with the actual value of your columns.
#places[status="Sunny"] { marker-fill: #A6CEE3; }
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Gmaps example | 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%; |
| <html> | |
| <head> | |
| <title>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"/> | |
| <style> | |
| html, body, #map { | |
| height: 100%; | |
| padding: 0; | |
| margin: 0; |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Leaflet control example | 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%; |
| with form-data npm package | |
| var form = new FormData();form.append('file', fs.createReadStream(path.join(__dirname, '../automation/testCarto.csv')));//${PROTOCOL}://${CDB_USER}.cartodb.com/api/v1/imports/?api_key=${API_KEY}form.submit({ protocol: 'https:', host:'xxx.cartodb.com', path:'/api/v1/imports/?api_key=xxxxxxx', method: 'post'}, function(err, res) { console.log(res.statusCode); console.log(err); test.object(res); done();}); |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> | |
| <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> | |
| <style> | |
| html, body, #map { | |
| height: 100%; |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Easy example | 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 { |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Custom search example | 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="http://libs.cartocdn.com/cartodb.js/v3/themes/css/cartodb.css" /> |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Example</title> | |
| <link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v3/themes/css/cartodb.css" /> | |
| <!--Switch between the different themes changing the stylesheet below - light-theme.css |dark-theme.css --> | |
| <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" /> |
| <script> | |
| function main() { | |
| var torqueLayer; | |
| var url = 'http://sdsfdsfb-0e853d047bba/viz.json'; | |
| cartodb.createVis('map', url, { | |
| search: false, | |
| tiles_loader: true, | |
| layer_selector: false, |