Skip to content

Instantly share code, notes, and snippets.

@enjalot
Last active August 29, 2015 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save enjalot/5f2bc12c56c4fbc694ef to your computer and use it in GitHub Desktop.
Save enjalot/5f2bc12c56c4fbc694ef to your computer and use it in GitHub Desktop.
streetview carosel
{"description":"streetview carosel","endpoint":"","display":"div","public":true,"require":[],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"_.md":{"default":true,"vim":false,"emacs":false,"fontSize":12},"config.json":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"fullscreen":false,"play":false,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"pingpong","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01,"ajax-caching":true,"thumbnail":"http://i.imgur.com/9dPGvG7.png"}
var width = 640;
var height = 640;
var url = "https://maps.googleapis.com/maps/api/streetview?location=37.80390,-122.29441&size=" + width + "x" + height + "&heading=";
var div = d3.select("#display");
var img = div.append("img")
var i = 0;
function run() {
img
.attr("src", url + i)
setTimeout(run, 100);
i += 10
if(i > 360) i = 0;
}
run(0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment