-4

I have a list of public links of Google streetview images similar to this

"https://maps.googleapis.com/maps/api/streetview?size=400x400&location=40.720032,-73.988354&fov=120&heading=120&pitch=20&key=AIzaSyC6UbcmFhZkX2q-3EyuHxl56e4zaF3L0y4"

I want to automate downloading of these image files to my computer using Javascript. Is there any Javascript library I can use for this task?

Zabir Al Nazi
  • 10,298
  • 4
  • 33
  • 60
  • 1
    It would help to post the code you've attempted so far and which part of your program you're struggling with. – Marquis Oct 18 '17 at 20:43
  • Actually, I haven't found any useful resource/documentation to attempt coding. I just need to know if there's any javascript library I can use? – Zabir Al Nazi Oct 18 '17 at 20:48

1 Answers1

1

For a download link you can use a link with the "download" attribute (from here):

<a href="https://maps.googleapis.com/maps/api/streetview?size=400x400&location=40.720032,-73.988354&fov=120&heading=120&pitch=20&key=AIzaSyC6UbcmFhZkX2q-3EyuHxl56e4zaF3L0y4" download>Download</a>

For an automatic download you can use a script (from here):

<script type="text/javascript">
    var link = document.createElement('a');
    link.href = 'https://maps.googleapis.com/maps/api/streetview?size=400x400&location=40.720032,-73.988354&fov=120&heading=120&pitch=20&key=AIzaSyC6UbcmFhZkX2q-3EyuHxl56e4zaF3L0y4';
    link.download = 'Download.jpg';
    document.body.appendChild(link);
    link.click();
</script>
0x90
  • 61
  • 3