README.md in spherical_mercator-1.1.0 vs README.md in spherical_mercator-1.1.1

- old
+ new

@@ -1,9 +1,8 @@ # Ruby port of Mapbox Spherical Mercator [![Gem Version](https://badge.fury.io/rb/spherical_mercator.svg)](http://badge.fury.io/rb/spherical_mercator) [![Build Status](https://travis-ci.org/nbulaj/spherical_mercator.svg?branch=master)](https://travis-ci.org/nbulaj/spherical_mercator) -[![Dependency Status](https://gemnasium.com/nbulaj/spherical_mercator.svg)](https://gemnasium.com/nbulaj/spherical_mercator) [![Coverage Status](https://coveralls.io/repos/github/nbulaj/spherical_mercator/badge.svg)](https://coveralls.io/github/nbulaj/spherical_mercator) [![License](http://img.shields.io/badge/license-MIT-brightgreen.svg)](#license) Spherical Mercator gem is a port of [Mapbox sphericalmercator JS lib](https://github.com/mapbox/sphericalmercator) that provides projection math for converting between mercator meters, screen pixels (of 256x256 or configurable-size tiles), and latitude/longitude. @@ -30,15 +29,19 @@ `[x, y]`. ```ruby # By default, precomputes up to z30 mercator = SphericalMercator.new(size: 256) +# Whether to round pixel values at integer zoom levels. Defaults to true. +mercator = SphericalMercator.new(round: false) ``` ### `px(lon_lat, zoom)` Convert lon, lat to screen pixel x, y from 0, 0 origin, at a certain zoom level. The inverse of `ll` + +Screen pixel values are rounded, unless the zoom level is a floating point value. To disable rounding on integer zoom levels, specify `round: false` when creating the SphericalMercator. ### `ll(px, zoom)` Convert screen pixel value to lon, lat, at a certain zoom level. The inverse of `px`