Permalink
Browse files

Be public-friendly

  • Loading branch information...
1 parent cebb605 commit 2fc0f9acc155e5781729b82cd37d99d15d074f04 @joshuaclayton committed Feb 19, 2011
Showing with 53 additions and 0 deletions.
  1. +22 −0 LICENSE
  2. +31 −0 README.markdown
View
22 LICENSE
@@ -0,0 +1,22 @@
+Copyright (c) 2011 Josh Clayton
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
View
@@ -0,0 +1,31 @@
+# Polylines
+
+## Easily handle Google polylines
+
+## Install
+
+Install with Rubygems:
+
+ gem install polylines
+
+## Usage
+
+To encode an array of latitude/longitude pairs:
+
+ >> Polylines::Encoder.encode_points([[38.5, -120.2], [40.7, -120.95], [43.252, -126.453]])
+ => "_p~iF~ps|U_ulLnnqC_mqNvxq`@"
+
+To decode a polyline into an array of latitude/longitude pairs:
+
+ >> Polylines::Decoder.decode_polyline("_p~iF~ps|U_ulLnnqC_mqNvxq`@")
+ => [[38.5, -120.2], [40.7, -120.95], [43.252, -126.453]]
+
+I wrote this to follow the steps outlined in http://code.google.com/apis/maps/documentation/utilities/polylinealgorithm.html.
+
+## License
+
+Please see LICENSE
+
+## Author
+
+Written by Josh Clayton

0 comments on commit 2fc0f9a

Please sign in to comment.