Skip to content

Commit

Permalink
Merge pull request #104 from mapbox/always-4096
Browse files Browse the repository at this point in the history
Use 4096-unit tiles as much as possible to keep GL happy
  • Loading branch information
e-n-f committed Oct 27, 2015
2 parents 3fbd0d6 + 0058360 commit 8993f01
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ Options

* -z _zoom_: Base (maxzoom) zoom level (default 14)
* -Z _zoom_: Lowest (minzoom) zoom level (default 0)
* -d _detail_: Detail at base zoom level (default 12 at -z14 or higher, or 13 at -z13 or lower. Detail beyond 13 has rendering problems with Mapbox GL.)
* -D _detail_: Detail at lower zoom levels (default 10, for tile resolution of 1024)
* -d _detail_: Detail at base zoom level (default 12, for tile resolution of 4096)
* -D _detail_: Detail at lower zoom levels (default 12, for tile resolution of 4096)
* -m _detail_: Minimum detail that it will try if tiles are too big at regular detail (default 7)
* -b _pixels_: Buffer size where features are duplicated from adjacent tiles. Units are "screen pixels"--1/256th of the tile width or height. (default 5)

Expand Down
12 changes: 2 additions & 10 deletions geojson.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "version.h"
#include "memfile.h"

int low_detail = 10;
int low_detail = 12;
int full_detail = -1;
int min_detail = 7;
int quiet = 0;
Expand Down Expand Up @@ -1274,15 +1274,7 @@ int main(int argc, char **argv) {
}

if (full_detail <= 0) {
if (maxzoom >= 14) {
// ~0.5m accuracy at z14
full_detail = 12;
} else {
// as good as we can get without breaking GL
full_detail = 13;
}

full_detail = 26 - maxzoom;
full_detail = 12;
}

if (full_detail < min_detail || low_detail < min_detail) {
Expand Down

0 comments on commit 8993f01

Please sign in to comment.