[wp-hackers] Comments and Google Maps

Brian Lalor blalor at bravo5.org
Mon Nov 14 02:00:40 GMT 2005


Good evening, all.  I'm trying to find a way to plot the location of  
commenters on a Google Map within a Page in WP.  I don't yet see a  
plugin for this, so I'm going to attempt to whack something  
together.  If this has already been done by someone, please let me  
know so I can stop wasting my time and everyone elses'. :-)

The basic concept is this: have a Page (in WP parlance) titled  
something along the lines of "Reader Locations", and collect on that  
page, via comments, the location of the commenter.  I intend to  
create a plugin that will add several fields (post code, lat/lon) to  
the comment form, and then, from within the page, present a Google  
Map with the locations plotted onto it.  This started off seeming  
fairly simple, but now I'm starting to see some additional complexity.

It looks like, in order to store the additional geographical  
information about the comment, I will have to create my own table in  
the DB.  Is this correct?  Is there any existing mechanism for  
storing arbitrary data about a comment?

I'd say that's the first thing I'm struggling with.  Once I'm able to  
store the content, enabling a Page or post with this capability will  
be simply adding a custom field or checking a box when editing the  
post.  I'll probably provide another PHP template that will provide  
the comments as an XML file to be consumed by the mapping code.

Is there a good example to follow that does something similar?

Thanks,
B

--
Brian Lalor / blalor at bravo5.org
     Notmeflex (nŏt mē´ flěks) n. The involuntary act of hitting  
the brakes
     when you see a cop, regardless of whether you're speeding or not.




More information about the wp-hackers mailing list