s2-geometry.js/README.md

20 lines
457 B
Markdown
Raw Normal View History

2014-01-23 17:05:56 +00: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
More details and examples to come later.
What you need to know for Pokemon GO clients:
```javascript
var cell = S2.S2Cell.FromLatLng({ lat: 40.2574448, lng: -111.7089464 }, 15);
cell.getNeighbors(); // [ cellLeft, cellDown, cellRight, cellUp ]
2016-07-26 01:40:26 +00:00
cell.getLatLng(); // { lat: 40.2574448, lng: -111.7089464 }
```