Compare commits

...

1 Commits

Author SHA1 Message Date
AJ ONeal e5f6d0f732 Add Simple Examples
KISS
2016-07-25 21:56:58 -04:00
1 changed files with 11 additions and 2 deletions

View File

@ -3,8 +3,17 @@ s2-geometry-javascript
Porting Google's S2 Geometry Library to Javascript Porting Google's S2 Geometry Library to Javascript
Currently contains basic support for S2Cell Currently contains basic support for S2Cell
More details and examples to come later. Simple Examples
---------------
```javascript
var cell = S2.S2Cell.FromLatLng({ lat: 40.2574448, lng: -111.7089464 }, 15);
cell.getNeighbors(); // [ cellLeft, cellDown, cellRight, cellUp ]
cell.getLatLng(); // { lat: 40.2574448, lng: -111.7089464 }
```
More details and examples to come later.