Skip to content

Commit

Permalink
changed all examples beta urls for example
Browse files Browse the repository at this point in the history
  • Loading branch information
xavijam committed Jul 1, 2013
1 parent d9fd429 commit fe3109e
Show file tree
Hide file tree
Showing 10 changed files with 7,361 additions and 1,741 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -53,7 +53,7 @@ quick start
// - go to map
// - click on share
// - API tab
var layerUrl = 'http://examples-beta.cartodb.com/api/v1/viz/219/viz.json';
var layerUrl = 'http://examples.cartodb.com/api/v1/viz/15589/viz.json';
cartodb.createLayer(map, layerUrl, function(layer) {
map.overlayMapTypes.setAt(0, layer);
});
Expand All @@ -71,7 +71,7 @@ quick start
}).addTo(map);

// add the cartodb layer
var layerUrl = 'http://examples-beta.cartodb.com/api/v1/viz/219/viz.json';
var layerUrl = 'http://examples.cartodb.com/api/v1/viz/15589/viz.json';
cartodb.createLayer(map, layerUrl, function(layer) {
map.addLayer(layer);
});
Expand Down
4 changes: 4 additions & 0 deletions dist/cartodb.css
Expand Up @@ -312,6 +312,10 @@
word-wrap: break-word;
}

div.cartodb-popup p.italic {
font-style: italic;
}

div.cartodb-popup p.loading {
position:relative;
display:block;
Expand Down
26 changes: 14 additions & 12 deletions dist/cartodb.js

Large diffs are not rendered by default.

26 changes: 14 additions & 12 deletions dist/cartodb.nojquery.js

Large diffs are not rendered by default.

8,968 changes: 7,289 additions & 1,679 deletions dist/cartodb.uncompressed.js

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions doc/API.md
Expand Up @@ -25,7 +25,7 @@ The simplest way to use a visualization created in CartoDB on an external site i
// - click on share
// - go to API tab
window.onload = function() {
cartodb.createVis('map', 'http://examples-beta.cartodb.com/api/v1/viz/219/viz.json');
cartodb.createVis('map', 'http://examples.cartodb.com/api/v1/viz/15589/viz.json');
}
</script>
```
Expand Down Expand Up @@ -70,7 +70,7 @@ This is the easiest way to quickly get a CartoDB map onto your webpage. It handl

<div class="margin20"></div>
``` javascript
cartodb.createVis('map', 'http://examples-beta.cartodb.com/api/v1/viz/791/viz.json');
cartodb.createVis('map', 'http://examples.cartodb.com/api/v1/viz/15589/viz.json');
```
<div class="margin20"></div>

Expand All @@ -80,7 +80,7 @@ You can also use the returned **layer** to build functionality (show/hide, click

<div class="margin20"></div>
``` javascript
cartodb.createVis('map', 'http://examples-beta.cartodb.com/api/v1/viz/791/viz.json')
cartodb.createVis('map', 'http://examples.cartodb.com/api/v1/viz/15589/viz.json')
.done(function(vis, layers) {
// layer 0 is the base layer, layer 1 is cartodb layer
layers[1].on('featureOver', function(e, latlng, pos, data, layerNumber) {
Expand Down Expand Up @@ -126,7 +126,7 @@ Next, in the BODY of your HTML include a DIV for your map and the minimum CartoD
center: [0,0],
zoom: 2
})
cartodb.createLayer(map, 'http://examples-beta.cartodb.com/api/v1/viz/766/viz.json').on('done', function(layer) {
cartodb.createLayer(map, 'http://examples.cartodb.com/api/v1/viz/15589/viz.json').on('done', function(layer) {
map.addLayer(layer);
})
.on('error', function(err) {
Expand Down Expand Up @@ -207,7 +207,7 @@ Creates a visualization inside the map_id DOM object:

<div class="margin20"></div>
``` javascript
var url = 'http://examples-beta.cartodb.com/api/v2/viz/791/viz.json';
var url = 'http://examples.cartodb.com/api/v1/viz/15589/viz.json';
cartodb.createVis('map', url)
.done(function(vis, layers) {
});
Expand Down Expand Up @@ -768,7 +768,7 @@ You can use all the functionality of cartodb.js with HTTPs support. Be sure to a
center: [0,0],
zoom: 2
})
cartodb.createLayer(map, 'https://examples-beta.cartodb.com/api/v2/viz/766/viz.json', { https: true })
cartodb.createLayer(map, 'http://examples.cartodb.com/api/v1/viz/15589/viz.json', { https: true })
.on('error', function(err) {
alert("some error occurred: " + err);
});
Expand Down
52 changes: 27 additions & 25 deletions examples/gmaps.html
Expand Up @@ -13,9 +13,9 @@
}
</style>

<link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v2/themes/css/cartodb.css" />
<link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v3/themes/css/cartodb.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v2/themes/css/cartodb.ie.css" />
<link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v3/themes/css/cartodb.ie.css" />
<![endif]-->
</head>

Expand All @@ -25,40 +25,42 @@
<!-- include google maps library *before* load cartodb.js -->
<script src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
<!-- include cartodb.js library -->
<script src="http://libs.cartocdn.com/cartodb.js/v2/cartodb.js"></script>
<script src="http://libs.cartocdn.com/cartodb.js/v3/cartodb.uncompressed.js"></script>

<script>

function main() {

var map;
// var map;

// create google maps map
var mapOptions = {
zoom: 3,
center: new google.maps.LatLng(43, 0),
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map(document.getElementById('map'), mapOptions);
// // create google maps map
// var mapOptions = {
// zoom: 3,
// center: new google.maps.LatLng(43, 0),
// mapTypeId: google.maps.MapTypeId.ROADMAP
// };
// map = new google.maps.Map(document.getElementById('map'), mapOptions);

cartodb.createLayer(map, 'http://examples.cartodb.com/api/v1/viz/european_countries_e/viz.json', {
query: 'select * from {{table_name}} where area::float > 10000' // if you remove this the query applied in the editor will be used
cartodb.createVis('map', 'http://staging.cartodb-staging.com/api/v2/viz/90834952-d8fc-11e2-9026-040101c8f401/viz.json');

// cartodb.createLayer(map, 'http://examples.cartodb.com/api/v1/viz/european_countries_e/viz.json', {
// query: 'select * from {{table_name}} where area::float > 10000' // if you remove this the query applied in the editor will be used

})
.on('done', function(layer) {
map.overlayMapTypes.setAt(0, layer);
// })
// .on('done', function(layer) {
// map.overlayMapTypes.setAt(0, layer);

layer.on('featureOver', function(e, pos, latlng, data) {
cartodb.log.log(e, pos, latlng, data);
});
// layer.on('featureOver', function(e, pos, latlng, data) {
// cartodb.log.log(e, pos, latlng, data);
// });

layer.on('error', function(err) {
cartodb.log.log('error: ' + err);
});
// layer.on('error', function(err) {
// cartodb.log.log('error: ' + err);
// });

}).on('error', function() {
cartodb.log.log("some error occurred");
});
// }).on('error', function() {
// cartodb.log.log("some error occurred");
// });

}

Expand Down
4 changes: 2 additions & 2 deletions examples/layer_selector_overlay.html
Expand Up @@ -50,8 +50,8 @@

//window.onload = main;
var fn = function() { cartodb.load('../src/', main); }
window.onload = fn;
// $(document).ready(main);
window.onload = fn;
// $(document).ready(main);
</script>
</body>
</html>
2 changes: 1 addition & 1 deletion examples/tutorials/tutorial-1.html
Expand Up @@ -24,7 +24,7 @@
attribution: 'Mapbox <a href="http://mapbox.com/about/maps" target="_blank">Terms &amp; Feedback</a>'
}).addTo(map);

var layerUrl = 'http://examples-beta.cartodb.com/api/v1/viz/936/viz.json';
var layerUrl = 'http://examples.cartodb.com/api/v1/viz/15589/viz.json';
var layerOptions = {
query: "SELECT * FROM {{table_name}} where adm0_a3 = 'USA'",
tile_style: "#{{table_name}}{marker-fill: #109DCD; marker-width: 5; marker-line-color: white; marker-line-width: 0;}"
Expand Down
4 changes: 2 additions & 2 deletions examples/tutorials/tutorial-2.html
Expand Up @@ -39,9 +39,9 @@ <h2>{{content.data.name}}</h2>
attribution: 'Mapbox <a href="http://mapbox.com/about/maps" target="_blank">Terms &amp; Feedback</a>'
}).addTo(map);

var layerUrl = 'http://examples-beta.cartodb.com/api/v1/viz/936/viz.json';
var layerUrl = 'http://examples.cartodb.com/api/v1/viz/15589/viz.json';
var layerOptions = {
query: "SELECT * FROM {{table_name}} where adm0_a3 = 'USA'",
query: "SELECT * FROM {{table_name}} where pop100::float > 1000",
tile_style: "#{{table_name}}{marker-fill: #109DCD; marker-width: 5; marker-line-color: white; marker-line-width: 0;}"
}

Expand Down

0 comments on commit fe3109e

Please sign in to comment.