Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added homepage and results page

  • Loading branch information...
commit 2fe1cfce3f5496519b7c0345644d70849e2a3f2e 1 parent 05b97d7
@joshmcarthur authored
Showing with 26 additions and 0 deletions.
  1. +10 −0 views/index.haml
  2. +16 −0 views/results.haml
View
10 views/index.haml
@@ -0,0 +1,10 @@
+%h1 Geocoder
+
+%form{:action => '/geocode', :method => 'post', :enctype => "multipart/form-data"}
+ %label Upload addresses
+ %input{:type => 'file', :name => 'file_to_geocode', :id => 'file_to_geocode'}
+ %input{:type => 'submit', :value => 'Geocode'}
+ %small.note
+ %strong File guidelines:
+ The file must be a CSV (comma seperated values), and must have no additional columns beyond address data. Special characters can be a problem, and so it is recommended that you export data from Excel in 'ASCII' encoding.
+
View
16 views/results.haml
@@ -0,0 +1,16 @@
+%h1 Results
+%table{:width => "100%"}
+ %thead
+ %tr
+ %th Address
+ %th Latitude
+ %th Longitude
+ %tbody
+ - @geocoded_data.each do |key, value|
+ %tr
+ %td
+ = key
+ %td
+ = value[:lat]
+ %td
+ = value[:long]
Please sign in to comment.
Something went wrong with that request. Please try again.