s2-cell-draw
A library for Google s2 cell draw
Install
npm i s2-cell-draw
Usage
- get s2-cell path from s2Key
const deboxByKey = ;const s2CellPath = ;console;
- get s2-cell key list that covers the screen
const createPolygonListFromBounds = ;/** * Point:[Lng:number,Lat:number]; * bounds:[southwest:Point,northeast:Point] */const s2KeyList = ;console;
- get s2-cell list that covers the screen
const createPolygonListFromBounds = ;/** * Point:[Lng:number,Lat:number]; * bounds:[southwest:Point,northeast:Point] */const polygonList = ;console;