Porting Google's S2 Geometry Library to Javascript
Go to file
AJ ONeal 020b5ab34e Add "what you need to know for Pokemon GO clients" 2016-07-25 21:36:32 -04:00
src initial commit - basic s2cell support 2014-01-23 17:07:50 +00:00
README.md Add "what you need to know for Pokemon GO clients" 2016-07-25 21:36:32 -04:00

README.md

s2-geometry-javascript

Porting Google's S2 Geometry Library to Javascript

Currently contains basic support for S2Cell

More details and examples to come later.

What you need to know for Pokemon GO clients:

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 }