Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


Back in December it seemed there was no way to bring in a CartoDB layer into a Mapbox.js or Tilemill project.

Has this changed?


I'd like to implement this on a few local government projects I'll be working on shortly.



share|improve this question
All, Tom MacWright has solved this issue here:… – DPSSpatial Apr 3 '13 at 16:56
up vote 3 down vote accepted

another example that may be useful:

<script src=""></script>
<script src=''></script>
function main() {
  var map = new L.Map('map', {
    zoomControl: false,
    center: [43, 0],
    zoom: 3

  cartodb.createLayer(map, '').addTo(map)

full example here:

share|improve this answer

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

You should always post the relevant content along with your link in case the link ever breaks or goes dead. – Evil Genius Dec 19 '13 at 15:58
Not necessary to -1, but agreed that more text would be great. – DPSSpatial Dec 19 '13 at 16:20
I edited to add the relevant code, thanks for the suggestion – javisantana Dec 20 '13 at 7:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.