Fish Fries
Today was Ash Wednesday, which to heathens like myself, means the season of fish fry's has officially begun. So, here are the current leading candidates around the tri-state area:
[UPDATED w/ All Saints Review]
Yeah, its a Google Map. Yeah its on my blog. Yeah it took me entirely too long to debug it and to copy all of the darn addresses to the post, but it works really well now :-DI had been wanting some way to store the locations for a given map external to a post ideally, but a couple days ago I decided I couldn't wait to find such a solution, and I figured out a decent way to handle it. I had to add two Javascript includes to the top of the template (one for the Google Map API and one for Prototype.js). Then add the bottom of the template within the body tags, I added scripts to scan the current DOM and look for any tags of class "MAPYARDSPOON". If it finds one, it looks through its attributes for the initial zoom/location of the map and uses the Google API to add a map within the DIV.
To add points on the map, the main DIV designates a class of elements which will contain data points for the particular map. The script them searches for all elements with the given class and pulls their attributes for the various points. Luckily, the API contains a built in Geocoding service so I can either add points by long/latitude or by address. I think it works pretty well. I will probably tweak it some more still but it fills the need for now. :)
Oh, yeah. I like food a little too much. And I am a huge nerd. You gotta love it!

No comments:
Post a Comment