s2-geometry.js/README.md

20 lines
442 B
Markdown
Raw Permalink Normal View History

2014-01-23 09:05:56 -08:00
s2-geometry-javascript
======================
Porting Google's S2 Geometry Library to Javascript
2014-01-23 17:10:43 +00:00
Currently contains basic support for S2Cell
2016-07-25 21:56:58 -04:00
Simple Examples
---------------
```javascript
var cell = S2.S2Cell.FromLatLng({ lat: 40.2574448, lng: -111.7089464 }, 15);
2014-01-23 17:10:43 +00:00
2016-07-25 21:56:58 -04:00
cell.getNeighbors(); // [ cellLeft, cellDown, cellRight, cellUp ]
cell.getLatLng(); // { lat: 40.2574448, lng: -111.7089464 }
```
More details and examples to come later.