1

When using Google's S2 geometry library to draw S2 cells on a google map widget, I'm getting cells that are outside my specified (constant) range.

S2RegionCoverer cov = new S2RegionCoverer();
cov.setMaxLevel(14);
cov.setMinLevel(14);
S2CellUnion cells = cov.getCovering(region_rect);

The resulting cells have levels 11-14, where am I going wrong?

Michael Entin
  • 7,189
  • 3
  • 21
  • 26
Sander
  • 412
  • 2
  • 14

1 Answers1

1

Apparently this is by design, and using this function instead, passing any point in the area as well as an empty ArrayList does the trick.

cov.getSimpleCovering(region_rect, bl.toPoint(),14,cells);
Sander
  • 412
  • 2
  • 14