Support per-feature minzoom and maxzoom in geobuf

This commit is contained in:
Eric Fischer
2017-08-30 11:44:57 -07:00
parent 607ea6c643
commit 5665d08745
5 changed files with 128 additions and 24 deletions
+4 -4
View File
@@ -69,7 +69,7 @@ json_pull *json_begin_file(FILE *f) {
}
static ssize_t read_string(json_pull *j, char *buffer, size_t n) {
char *cp = j->source;
const char *cp = j->source;
size_t out = 0;
while (out < n && cp[out] != '\0') {
@@ -77,12 +77,12 @@ static ssize_t read_string(json_pull *j, char *buffer, size_t n) {
out++;
}
j->source = cp + out;
j->source = (void *) (cp + out);
return out;
}
json_pull *json_begin_string(char *s) {
return json_begin(read_string, s);
json_pull *json_begin_string(const char *s) {
return json_begin(read_string, (void *) s);
}
void json_end(json_pull *p) {
+1 -1
View File
@@ -56,7 +56,7 @@ typedef struct json_pull {
} json_pull;
json_pull *json_begin_file(FILE *f);
json_pull *json_begin_string(char *s);
json_pull *json_begin_string(const char *s);
json_pull *json_begin(ssize_t (*read)(struct json_pull *, char *buffer, size_t n), void *source);
void json_end(json_pull *p);