mirror of
https://github.com/felt/tippecanoe.git
synced 2026-10-06 18:35:41 +02:00
Merge pull request #612 from mapbox/negative-shift
Don't guess a higher maxzoom than is allowed for manual selection
This commit is contained in:
@@ -1,3 +1,7 @@
|
|||||||
|
## 1.30.2
|
||||||
|
|
||||||
|
* Don't guess a higher maxzoom than is allowed for manual selection
|
||||||
|
|
||||||
## 1.30.1
|
## 1.30.1
|
||||||
|
|
||||||
* Ensure that per-feature minzoom and maxzoom are integers
|
* Ensure that per-feature minzoom and maxzoom are integers
|
||||||
|
|||||||
@@ -1975,8 +1975,11 @@ int read_input(std::vector<source> &sources, char *fname, int maxzoom, int minzo
|
|||||||
if (maxzoom < 0) {
|
if (maxzoom < 0) {
|
||||||
maxzoom = 0;
|
maxzoom = 0;
|
||||||
}
|
}
|
||||||
if (maxzoom > MAX_ZOOM) {
|
if (maxzoom > 32 - full_detail) {
|
||||||
maxzoom = MAX_ZOOM;
|
maxzoom = 32 - full_detail;
|
||||||
|
}
|
||||||
|
if (maxzoom > 33 - low_detail) { // that is, maxzoom - 1 > 32 - low_detail
|
||||||
|
maxzoom = 33 - low_detail;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!quiet) {
|
if (!quiet) {
|
||||||
@@ -1991,8 +1994,11 @@ int read_input(std::vector<source> &sources, char *fname, int maxzoom, int minzo
|
|||||||
if (mz < 0) {
|
if (mz < 0) {
|
||||||
mz = 0;
|
mz = 0;
|
||||||
}
|
}
|
||||||
if (mz > MAX_ZOOM) {
|
if (mz > 32 - full_detail) {
|
||||||
mz = MAX_ZOOM;
|
mz = 32 - full_detail;
|
||||||
|
}
|
||||||
|
if (mz > 33 - low_detail) { // that is, mz - 1 > 32 - low_detail
|
||||||
|
mz = 33 - low_detail;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mz > maxzoom || count <= 0) {
|
if (mz > maxzoom || count <= 0) {
|
||||||
@@ -2993,6 +2999,10 @@ int main(int argc, char **argv) {
|
|||||||
maxzoom = 32 - full_detail;
|
maxzoom = 32 - full_detail;
|
||||||
fprintf(stderr, "Highest supported zoom with detail %d is %d\n", full_detail, maxzoom);
|
fprintf(stderr, "Highest supported zoom with detail %d is %d\n", full_detail, maxzoom);
|
||||||
}
|
}
|
||||||
|
if (maxzoom > 33 - low_detail) { // that is, maxzoom - 1 > 32 - low_detail
|
||||||
|
maxzoom = 33 - low_detail;
|
||||||
|
fprintf(stderr, "Highest supported zoom with low detail %d is %d\n", low_detail, maxzoom);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (maxzoom > MAX_ZOOM) {
|
if (maxzoom > MAX_ZOOM) {
|
||||||
maxzoom = MAX_ZOOM;
|
maxzoom = MAX_ZOOM;
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
#ifndef VERSION_HPP
|
#ifndef VERSION_HPP
|
||||||
#define VERSION_HPP
|
#define VERSION_HPP
|
||||||
|
|
||||||
#define VERSION "v1.30.1"
|
#define VERSION "v1.30.2"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user