[datapress] r145 committed - Adding geocoder class

0 views
Skip to first unread message

codesite...@google.com

unread,
Feb 16, 2011, 4:04:25 PM2/16/11
to datapres...@googlegroups.com
Revision: 145
Author: edward.benson
Date: Wed Feb 16 13:03:50 2011
Log: Adding geocoder class
http://code.google.com/p/datapress/source/detail?r=145

Added:
/trunk/plugin/wp-exhibit-geocoder.php

=======================================
--- /dev/null
+++ /trunk/plugin/wp-exhibit-geocoder.php Wed Feb 16 13:03:50 2011
@@ -0,0 +1,45 @@
+<?php
+
+class WpExhibitGeocoder {
+
+ // Note: to get the google map API key, do this:
+ // $google_map_api_key = get_option( 'google_map_api_key' );
+
+ // If you need a separate key, other than this one, grep the project
for google_map_api_key to see
+ // how we created an option form to add it
+
+ // Perform the geocoding for a batch of items
+ static function batch_add($exhibit_id, $datum_ids, $addresses) {
+ }
+
+ // Perform the geocoding for a single item
+ static function doesExhibitContainGeocodedData($exhibit_id) {
+ // Returns BOOL
+ }
+
+ static function lookup($exhibit_id, $datum_id, $address) {
+ /*
+ * If in database, reutrn lat,lng from database
+ * Else, geocode; save to db, lookup from db
+ */
+ }
+
+ static function geocode($address) {
+ }
+
+ static function save($exhibit_id, $datum_id, $address) {
+ }
+
+ // Pring out a data file for an exhibit
+ static function json_for($exhibit_id) {
+ // look up all points for the exhibit
+ // write out tuples <datum_id, latlng>
+ }
+
+ static function say_hello() {
+ }
+}
+
+WpExhibitGeocoder::say_hello()
+
+?>

Reply all
Reply to author
Forward
0 new messages