Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Format code in reamde

  • Loading branch information...
commit 347ebf735260da2fec5ca0c0ce43cf98f1b231c3 1 parent 0ae4947
@bryckbost bryckbost authored
Showing with 9 additions and 9 deletions.
  1. +9 −9 README.textile
View
18 README.textile
@@ -4,25 +4,25 @@ Graticule is a geocoding API for looking up address coordinates. It supports ma
h2. Usage
- require 'rubygems'
- require 'graticule'
- geocoder = Graticule.service(:google).new "api_key"
- location = geocoder.locate "61 East 9th Street, Holland, MI"
+<pre><code>require 'rubygems'
+require 'graticule'
+geocoder = Graticule.service(:google).new "api_key"
+location = geocoder.locate "61 East 9th Street, Holland, MI"</code></pre>
h2. Distance Calculation
Graticule includes 3 different distance formulas, Spherical (simplest but least accurate), Vincenty (most accurate and most complicated), and Haversine (somewhere inbetween).
- geocoder.locate("Holland, MI").distance_to(geocoder.locate("Chicago, IL"))
- #=> 101.997458788177
+<pre><code>geocoder.locate("Holland, MI").distance_to(geocoder.locate("Chicago, IL"))
+#=> 101.997458788177</code></pre>
h2. Command Line
Graticule includes a command line interface (CLI).
- $ geocode -s yahoo -a yahookey Washington, DC
- Washington, DC US
- latitude: 38.895222, longitude: -77.036758
+<pre><code>$ geocode -s yahoo -a yahookey Washington, DC
+Washington, DC US
+latitude: 38.895222, longitude: -77.036758</code></pre>
h2. Mailing List
Please sign in to comment.
Something went wrong with that request. Please try again.