forked from sam-itt/sofis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstatic-map-provider.h
39 lines (31 loc) · 1023 Bytes
/
static-map-provider.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
* SPDX-FileCopyrightText: 2021 Samuel Cuella <[email protected]>
*
* This file is part of SoFIS - an open source EFIS
*
* SPDX-License-Identifier: GPL-2.0-only
*/
#ifndef STATIC_MAP_PROVIDER_H
#define STATIC_MAP_PROVIDER_H
#include "map-provider.h"
typedef struct{
/* In TMS mode, the Y axis (tiles coordinates within the world map)
* is reversed*/
bool is_tms;
char *base;
char *lvl;
char *tilex;
char *tiley;
}StaticMapProviderUrlTemplate;
typedef struct{
MapProvider super;
char *home;
char *format; /*tile file extension*/
char *buffer; /*store filenames*/
size_t bsize; /*in bytes*/
StaticMapProviderUrlTemplate url;
}StaticMapProvider;
StaticMapProvider *static_map_provider_new(const char *home, const char *format, intf8_t priority);
StaticMapProvider *static_map_provider_init(StaticMapProvider *self, const char *home,
const char *format, intf8_t priority);
#endif /* STATIC_MAP_PROVIDER_H */