Skip to content

Commit

Permalink
add precision to declaration of getZoomByPrecision and setZoomByPreci…
Browse files Browse the repository at this point in the history
…sion
  • Loading branch information
nstjean committed Dec 23, 2019
1 parent 2c2a125 commit 3072a1b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ We welcome contributions, and are especially interested in welcoming [first time
| `blurredLocation.getPrecision()` | Returns precision of degrees -- represented by width or height of one grid cell. Returns an integer which represents the number of decimal places occupied by one cell. For instance, a precision of 1 will mean 0.1 degrees per cell, 2 will mean 0.01 degrees, and so on | `location.getPrecision()` This would return the precision of the map at the current zoom level. |
| `blurredLocation.getPlacenameFromCoordinates()` | Returns human-readable location name of a specific latitude and longitude. This would take in 3 arguments namely latitude, longitude and a callback function which is called on success and would return address of the location pinpointed by those co-ordinates| `blurredLocation.getPlacenameFromCoordinates(43, 43, function(result) { console.log(result) }` This would return the output to the console |
| `blurredLocation.map` | Used to access the Leaflet object | |
| `blurredLocation.setZoomByPrecision()` | Zooms map to the given precision. | `blurredLocation.setZoomByPrecision(2)` This would zoom the map so that the precision of map becomes 2, and each grid square is `0.01` degrees wide and tall. |
| `blurredLocation.getZoomByPrecision()` | Returns the correct zoom level for the given precision. | `blurredLocation.setZoomByPrecision(0)` would return 6 |
| `blurredLocation.setZoomByPrecision(precision)` | Zooms map to the given precision. | `blurredLocation.setZoomByPrecision(2)` This would zoom the map so that the precision of map becomes 2, and each grid square is `0.01` degrees wide and tall. |
| `blurredLocation.getZoomByPrecision(precision)` | Returns the correct zoom level for the given precision. Does not change the map. | `blurredLocation.setZoomByPrecision(0)` would return 6 |
| `blurredLocation.setZoom(zoom)` | Zooms the map to the given zoom value | |
| `blurredLocation.getZoom()` | Returns the current zoom level | `blurredLocation.getZoom()` would return an integer |
| `blurredLocation.getPrecisionFromNum(num)` | Calculates the precision value of a given float | `blurredLocation.getPrecisionFromNum(12.345)` would return 3 |
Expand Down

0 comments on commit 3072a1b

Please sign in to comment.