X-Received: by 10.224.200.202 with SMTP id ex10mr3662399qab.8.1369221672185; Wed, 22 May 2013 04:21:12 -0700 (PDT) X-Received: by 10.49.42.1 with SMTP id j1mr573336qel.41.1369221672164; Wed, 22 May 2013 04:21:12 -0700 (PDT) Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!ch1no296285qab.0!news-out.google.com!y6ni50756qax.0!nntp.google.com!ch1no296284qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.python Date: Wed, 22 May 2013 04:21:12 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=70.31.30.218; posting-account=-YsrEQoAAAArTWUxnLVRE9CW9TJaeBZW NNTP-Posting-Host: 70.31.30.218 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Static Maps from Lat Long data in XLS file From: kobewka@gmail.com Injection-Date: Wed, 22 May 2013 11:21:12 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: csiph.com comp.lang.python:45721 Thanks Ken. I'll have a closer look at those links. I also found Motionless= , which creates a static map HTML file. Combined with what you said, I shou= ld be able to get what I need. https://github.com/ryancox/motionless Scott On Tuesday, May 21, 2013 9:58:25 AM UTC-4, Ken Bolton wrote: > On Tue, May 21, 2013 at 9:12 AM, wrote: >=20 >=20 > Hello, >=20 >=20 >=20 > I'm new to Python, but I think it can solve my problem and I am looking f= or a someone to point me to tutorial or give me some tips here. >=20 > =A0 > Hi! I am a first-time poster to python-list, but I think I can help you. >=20 >=20 > =A0 > 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 f= rom the coordinates, or 2) create an html file with the map and street view= image side by side. >=20 >=20 >=20 >=20 > If you save your xls file as a csv (comma-separated values), you can use = python's built-in csv module, documented here - http://docs.python.org/2/li= brary/csv.html, to read the file line by line. Store the values and substit= ute the strings into a new list of URLs. >=20 >=20 > =A0 > I need the urls to look like this: >=20 >=20 >=20 > Map with a pin in the centre: >=20 > http://maps.googleapis.com/maps/api/staticmap?center=3D43.65162,-79.40571= &zoom=3D16&size=3D600x600&markers=3Dcolor:blue%7Clabel:S%7C43.65162,-79.405= 71&sensor=3Dfalse >=20 >=20 >=20 >=20 >=20 > Image: >=20 > http://maps.googleapis.com/maps/api/streetview?location=3D43.65162,%20-79= .40571&size=3D600x600&sensor=3Dfalse >=20 >=20 >=20 >=20 > I was able to use curl to grab the images you linked. I believe you can u= se urllib (or, better, requests - http://docs.python-requests.org/en/latest= /) to get and save the images. >=20 >=20 >=20 >=20 > hth. >=20 >=20 > best, > ken