<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote">On Tue, May 21, 2013 at 9:12 AM, <span dir="ltr"><<a href="mailto:kobewka@gmail.com" target="_blank">kobewka@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Hello,<br>
<br>
I'm new to Python, but I think it can solve my problem and I am looking for a someone to point me to tutorial or give me some tips here.<br></blockquote><div> </div><div>Hi! I am a first-time poster to python-list, but I think I can help you.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
I have an xls file that has about 1,000 latitude and longitude points. I want to do one of two things: 1) Save a static maps and street view image from the coordinates, or 2) create an html file with the map and street view image side by side.</blockquote>
<div><br></div><div style>If you save your xls file as a csv (comma-separated values), you can use python's built-in csv module, documented here - <a href="http://docs.python.org/2/library/csv.html">http://docs.python.org/2/library/csv.html</a>, to read the file line by line. Store the values and substitute the strings into a new list of URLs.</div>
<div style> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
I need the urls to look like this:<br>
<br>
Map with a pin in the centre:<br>
<a href="http://maps.googleapis.com/maps/api/staticmap?center=43.65162,-79.40571&zoom=16&size=600x600&markers=color:blue%7Clabel:S%7C43.65162,-79.40571&sensor=false" target="_blank">http://maps.googleapis.com/maps/api/staticmap?center=43.65162,-79.40571&zoom=16&size=600x600&markers=color:blue%7Clabel:S%7C43.65162,-79.40571&sensor=false</a><br>
<br>
Image:<br>
<a href="http://maps.googleapis.com/maps/api/streetview?location=43.65162,%20-79.40571&size=600x600&sensor=false" target="_blank">http://maps.googleapis.com/maps/api/streetview?location=43.65162,%20-79.40571&size=600x600&sensor=false</a></blockquote>
<div><br></div><div style>I was able to use curl to grab the images you linked. I believe you can use urllib (or, better, requests - <a href="http://docs.python-requests.org/en/latest/">http://docs.python-requests.org/en/latest/</a>) to get and save the images.</div>
<div style><br></div><div style>hth.</div><div style><br></div><div style>best,</div><div style>ken</div></div></div></div>