<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,9 +1,12 @@
 class ChapFiveController &lt; ApplicationController
   def map
+=begin
     structures = FccStructure.find_all_by_state 'HI', :include =&gt; [:fcc_owner, :fcc_location]
     @towers = Array.new
     structures.each do |s|
       @towers.push({ :latitude =&gt; s.fcc_location.latitude, :longitude =&gt; s.fcc_location.longitude, :name =&gt; s.address})
     end
+=end
+    @towers = Tower.find_all_by_state 'HI'
   end
 end</diff>
      <filename>app/controllers/chap_five_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,3 @@
 class Tower &lt; ActiveRecord::Base
-  def to_json
-    self.attributes.to_json
-  end
+
 end
\ No newline at end of file</diff>
      <filename>app/models/tower.rb</filename>
    </modified>
    <modified>
      <diff>@@ -9,10 +9,10 @@
 
       &lt;%= javascript_include_tag 'prototype', 'application_chap_five' %&gt;
 		&lt;script type=&quot;text/javascript&quot;&gt;
-			var markers = &lt;%= @towers.to_json %&gt;;
+			var markers = &lt;%= (@towers.collect { |t| t.attributes }).to_json %&gt;;
 		&lt;/script&gt;
   &lt;/head&gt;
   &lt;body&gt;
-    &lt;div id=&quot;map&quot; style=&quot;width: 800px; height: 600px&quot;&gt;&lt;/div&gt;
+    &lt;div id=&quot;map&quot; style=&quot;width: 800px; height: 700px&quot;&gt;&lt;/div&gt;
   &lt;/body&gt;
 &lt;/html&gt;
\ No newline at end of file</diff>
      <filename>app/views/chap_five/map.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -5,12 +5,12 @@ class CreateTowers &lt; ActiveRecord::Migration
       t.float :longitude
       t.string :owner_name, :limit =&gt; 200
       t.string :owner_address, :limit =&gt; 35
-      t.string :owner_state, :limit =&gt; 2
       t.string :owner_city, :limit =&gt; 20
+      t.string :owner_state, :limit =&gt; 2
       t.string :owner_zip, :limit =&gt; 10
       t.string :address, :limit =&gt; 35
-      t.string :state, :limit =&gt; 2
       t.string :city, :limit =&gt; 20
+      t.string :state, :limit =&gt; 2
       t.float :height
       t.float :elevation
       t.float :ohag</diff>
      <filename>db/migrate/20080702015631_create_towers.rb</filename>
    </modified>
    <modified>
      <diff>@@ -9,14 +9,57 @@
 #
 # It's strongly recommended to check this file into your version control system.
 
-ActiveRecord::Schema.define(:version =&gt; 20080627051703) do
+ActiveRecord::Schema.define(:version =&gt; 20080702015631) do
+
+  create_table &quot;fcc_locations&quot;, :force =&gt; true do |t|
+    t.integer &quot;unique_si&quot;, :limit =&gt; 11
+    t.integer &quot;lat_deg&quot;,   :limit =&gt; 11
+    t.integer &quot;lat_min&quot;,   :limit =&gt; 11
+    t.float   &quot;lat_sec&quot;
+    t.string  &quot;lat_dir&quot;,   :limit =&gt; 1
+    t.float   &quot;latitude&quot;
+    t.integer &quot;long_deg&quot;,  :limit =&gt; 11
+    t.integer &quot;long_min&quot;,  :limit =&gt; 11
+    t.float   &quot;long_sec&quot;
+    t.string  &quot;long_dir&quot;,  :limit =&gt; 1
+    t.float   &quot;longitude&quot;
+  end
+
+  add_index &quot;fcc_locations&quot;, [&quot;unique_si&quot;], :name =&gt; &quot;index_fcc_locations_on_unique_si&quot;
+
+  create_table &quot;fcc_owners&quot;, :force =&gt; true do |t|
+    t.integer &quot;unique_si&quot;, :limit =&gt; 11
+    t.string  &quot;name&quot;,      :limit =&gt; 200
+    t.string  &quot;address&quot;,   :limit =&gt; 35
+    t.string  &quot;city&quot;,      :limit =&gt; 20
+    t.string  &quot;state&quot;,     :limit =&gt; 2
+    t.string  &quot;zip&quot;,       :limit =&gt; 10
+  end
+
+  add_index &quot;fcc_owners&quot;, [&quot;unique_si&quot;], :name =&gt; &quot;index_fcc_owners_on_unique_si&quot;
+
+  create_table &quot;fcc_structures&quot;, :force =&gt; true do |t|
+    t.integer &quot;unique_si&quot;,        :limit =&gt; 11
+    t.string  &quot;address&quot;,          :limit =&gt; 80
+    t.string  &quot;city&quot;,             :limit =&gt; 20
+    t.string  &quot;state&quot;,            :limit =&gt; 2
+    t.float   &quot;height&quot;
+    t.float   &quot;elevation&quot;
+    t.float   &quot;ohag&quot;
+    t.float   &quot;ohamsl&quot;
+    t.string  &quot;structure_type&quot;,   :limit =&gt; 6
+    t.date    &quot;date_constructed&quot;
+    t.date    &quot;date_dismantled&quot;
+  end
+
+  add_index &quot;fcc_structures&quot;, [&quot;unique_si&quot;], :name =&gt; &quot;index_fcc_structures_on_unique_si&quot;
 
   create_table &quot;markers&quot;, :force =&gt; true do |t|
-    t.decimal &quot;lat&quot;
-    t.decimal &quot;lng&quot;
+    t.decimal &quot;lat&quot;,                  :precision =&gt; 15, :scale =&gt; 10
+    t.decimal &quot;lng&quot;,                  :precision =&gt; 15, :scale =&gt; 10
     t.string  &quot;found&quot;, :limit =&gt; 100
     t.string  &quot;left&quot;,  :limit =&gt; 100
-    t.string  &quot;icon&quot;,  :limit =&gt; 100, :default =&gt; &quot;&quot;
+    t.string  &quot;icon&quot;,  :limit =&gt; 100,                                 :default =&gt; &quot;&quot;
   end
 
   create_table &quot;stores&quot;, :force =&gt; true do |t|
@@ -31,4 +74,26 @@ ActiveRecord::Schema.define(:version =&gt; 20080627051703) do
     t.string &quot;lng&quot;,      :limit =&gt; 20
   end
 
+  create_table &quot;towers&quot;, :force =&gt; true do |t|
+    t.float  &quot;latitude&quot;
+    t.float  &quot;longitude&quot;
+    t.string &quot;owner_name&quot;,     :limit =&gt; 200
+    t.string &quot;owner_address&quot;,  :limit =&gt; 35
+    t.string &quot;owner_city&quot;,     :limit =&gt; 20
+    t.string &quot;owner_state&quot;,    :limit =&gt; 2
+    t.string &quot;owner_zip&quot;,      :limit =&gt; 10
+    t.string &quot;address&quot;,        :limit =&gt; 35
+    t.string &quot;city&quot;,           :limit =&gt; 20
+    t.string &quot;state&quot;,          :limit =&gt; 2
+    t.float  &quot;height&quot;
+    t.float  &quot;elevation&quot;
+    t.float  &quot;ohag&quot;
+    t.float  &quot;ohamsl&quot;
+    t.string &quot;structure_type&quot;, :limit =&gt; 6
+  end
+
+  add_index &quot;towers&quot;, [&quot;state&quot;], :name =&gt; &quot;index_towers_on_state&quot;
+  add_index &quot;towers&quot;, [&quot;latitude&quot;], :name =&gt; &quot;index_towers_on_latitude&quot;
+  add_index &quot;towers&quot;, [&quot;longitude&quot;], :name =&gt; &quot;index_towers_on_longitude&quot;
+
 end</diff>
      <filename>db/schema.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,8 @@
 var map;
-var centerLatitude = 40.6897;
-var centerLongitude = -95.0446;
-var startZoom = 3;
+var centerLatitude = 19.5;
+var centerLongitude = -155.5; 
+var startZoom = 9;
+
 
 function addMarker(latitude, longitude, description) {
 	var marker = new GMarker(new GLatLng(latitude, longitude));</diff>
      <filename>public/javascripts/application_chap_five.js</filename>
    </modified>
    <modified>
      <diff>@@ -25,7 +25,7 @@ process_file('CO.dat', 'fcc_locations.dat') do |line|
   latitude = sign * (lat_deg.to_f + lat_min.to_f / 60 + lat_sec.to_f / 3600)
   sign = (long_dir == 'W') ? -1 : 1
   longitude = sign * (long_deg.to_f + long_min.to_f / 60 + long_sec.to_f / 3600)
-  [unique_si, lat_deg, lat_min, lat_sec, latitude, long_deg, long_min, long_sec, long_dir, longitude].join('|')
+  [unique_si, lat_deg, lat_min, lat_sec, lat_dir, latitude, long_deg, long_min, long_sec, long_dir, longitude].join('|')
 end
 
 puts &quot;Complete&quot;
\ No newline at end of file</diff>
      <filename>tools/import_fcc.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>66c9a9aa6132fc4068ea94aaa27b78bf995ccb65</id>
    </parent>
  </parents>
  <author>
    <name>ashchan</name>
    <email>ashchan@gmail.com</email>
  </author>
  <url>http://github.com/ashchan/google_maps_example/commit/d04fd4b22b27eee70f0f034a8a6daf21df37848c</url>
  <id>d04fd4b22b27eee70f0f034a8a6daf21df37848c</id>
  <committed-date>2008-07-01T22:36:10-07:00</committed-date>
  <authored-date>2008-07-01T22:36:10-07:00</authored-date>
  <message>chapter five</message>
  <tree>7e8c9370ebc79889745ffd5170fe3e466d9f0bf1</tree>
  <committer>
    <name>ashchan</name>
    <email>ashchan@gmail.com</email>
  </committer>
</commit>
