For the last 7 years San Francisco has run Dine About Town to encourage people to go out in January (post holiday spending is traditionally low).
This is a great way to try a new restaurant or return to a place you love. Macworld is just around the corner so visitors can experience some of San Francisco’s tastiest restaurants at a reasonable price.
A 3 course lunch is $21.95 and dinner is $31.95 between January 15 and January 31.
I made a map of for all the restaurants that are participating. If you want to see it fill your screen go here.
View Larger Map
The map is bookmarked on my iphone so I can find a participating restaurant nearby and call/open table (yes open table is now a verb, as in: I open tabled for 7 at Mavericks tonight [photos review].) it while I’m out and about. It unfortunately loads a little slower than I would like. I added the special tag to make the phone numbers call-able on the iphone, but gmaps strips it out. Boooooo
I just *love* food and I want to make it easier for me (and perhaps some other people) to get things in my belly. (BTW I love Jo’s blog about restaurants. Sorry for never commenting.) If this map was useful to you, please let me know.
The coding stuff
For the first couple of restaurants, I manually copied and pasted info from the site to placemarks on gmaps. After about 10 minutes (and 3 restaurants) I noticed the “import” button. Ooooo kml. Scripting saves time, right? I spent about an hour writing a simple php script that extracts the url of each restaurant and then hits that restaurant page to grab the phone number, address, etc. It took me about 20 minutes to figure out why this kept returning 0:
$url = ” + $matches;
I thought I was going insane. Turns out I was just stupid. Php, it’s been too long since I’ve touched you. We need to touch more often.
Then it was time to turn the resulting restaurant array into kml. I make a test file and try to import via upload. It failed. Hmmm. After using one of their kml examples I found out that uploading fails every time. So I hosted the sample file, and the import worked. Instead of using <Point> (exact coordinates of the location) I wanted to use <address>. The documentation told me it would work. It seems to only work for one placemark. When I had 2 placemarks, only the first one imported and my maps title became ‘error’. I should have known that this was all a waste of time when the kml documentation kept hanging firefox.
And the blah blah blah with the mew mew. I ended up outputting my array into html and then manually copied and pasted the html onto each placemark. I’d love to know what is wrong with this kml in case I want to make more maps in the future. I’m sure it’s a lack of understanding on my part.