Atlas PRFree, open, interactive, detailed maps of Puerto Rico for your web applications.

Zoom to specific pueblo and then back to the original.

 1 // change the argument to match your id
 2 var node = document.getElementById("pueblos-map");
 3 var after_drawing = function after_drawing(atlas){
 4   atlas.zoom_to_pueblo("Barranquitas", 
 5     // zoom happens in some time, function gets called at the end of zooming.
 6     function(){
 7       atlas.zoom_to_pueblo("Mayagüez", 
 8         // zoom happens in some time, function gets called at the end of zooming.
 9         function(){
10           atlas.zoom_to_original();
11       })
12     });
13 };
14 var config = {
15   node: node, 
16   tiles: 'pueblos',
17   size: "large",   
18   zoom: true,
19   labels: true,
20   on_ready: after_drawing
21 }; 
22 new AtlasPR(config);
Fork me on GitHub