1 // change the argument to match your id
2 var node = document.getElementById("pueblos-map");
3 function after_loading(atlas){
4 var centroids = [];
5 atlas.data.pueblos.features.forEach(function(pueblo){
6 var centroid = d3.geo.centroid(pueblo);
7 centroids.push({center: centroid, text: pueblo.properties.NAME});
8 });
9 atlas.add_markers(centroids);
10 };
11 var config = {
12 node: node,
13 tiles: 'pueblos',
14 size: "large",
15 zoom: true,
16 on_ready: after_loading
17 };
18 new AtlasPR(config);