CartoDB.js no attribution
How to remove attribution and logo from a visualization
by ricajess
HTML
<link rel="stylesheet" href="https://cartodb-libs.global.ssl.fastly.net/cartodb.js/v3/themes/css/cartodb.css">
<script src="https://maps.googleapis.com/maps/api/js?signed_in=true&sensor=true"></script>
<script src="https://cartodb-libs.global.ssl.fastly.net/cartodb.js/v3/3.15/cartodb.js"></script>
<div id="map"></div>
CSS
html,
body,
#map {
height: 100%;
padding: 0;
margin: 0;
}
/* Hide attribution control, beware with data license!!*/
.leaflet-control-attribution,
div#cartodb-gmaps-attribution {
display: none;
}
JavaScript
var viz = 'https://team.cartodb.com/u/jsanz/api/v2/viz/d522eeee-9e6d-11e5-9207-0e31c9be1b51/viz.json';
// Map center
var myLatlng = new google.maps.LatLng(37.753, 0);
var myOptions = {
zoom: 5,
center: myLatlng,
disableDefaultUI: true,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
// Render basemap
map = new google.maps.Map(document.getElementById("map"), myOptions);
cartodb.createLayer(map, viz, {
cartodb_logo: false
}).addTo(map);