diff --git a/README.md b/README.md index 511a8f8..811ac93 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![Leaflet 0.7 compatible!](https://img.shields.io/badge/Leaflet%200.7-%E2%9C%93-1EB300.svg?style=flat)](http://leafletjs.com/reference-0.7.7.html) [![Leaflet 1.x compatible!](https://img.shields.io/badge/Leaflet%201.x-%E2%9C%93-1EB300.svg?style=flat)](http://leafletjs.com/reference.html) -Simple [UTM](https://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system) (WGS84) methods for L.LatLng. Tested with Leaflet 0.7, 1.0.3, 1.1.0, 1.2.0 and 1.3.1. +Simple [UTM](https://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system) (WGS84) methods for L.LatLng. Tested with Leaflet 0.7, 1.0.3, 1.1.0, 1.2.0, 1.3.1 and 1.6.0. Based on javascript code from Chuck Taylor's [Toolbox](http://home.hiwaay.net/~taylorc/toolbox/geography/geoutm.html). @@ -28,6 +28,15 @@ var txt = map.getCenter().utm().toString({decimals: 0, format: '{x} {y} {zone} { ``` that produces `467486 4101149 30 North` +You can also use the values of that `object` directly (like `c.utm().x`). Here is a dump in the Console: +```JavaScript +L.Utm {x: 467486.3402722592, + y: 4101149.337496558, + zone: 30, + band: "S", + southHemi: false} +``` + ### UTM -> LatLng Just create an object with `L.utm(options)`, and call the method `latLng` like here: ```JavaScript diff --git a/bower.json b/bower.json index 071bbc9..4904ebf 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "leaflet.utm", - "version": "0.0.5", + "version": "1.0.0", "homepage": "https://github.com/jjimenezshaw/Leaflet.UTM", "authors": [ "Javier Jimenez Shaw" diff --git a/examples/input.html b/examples/input.html index 337f522..f9ab6b3 100644 --- a/examples/input.html +++ b/examples/input.html @@ -2,11 +2,11 @@ + + Leaflet UTM Demo - - + +