jonatkins / s2-geometry-javascript

Porting Google's S2 Geometry Library to Javascript
31 stars 17 forks source link

Add Simple Examples #4

Closed coolaj86 closed 8 years ago

coolaj86 commented 8 years ago

KISS, done!

Simple Examples

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 }