changed render levels for labels/place names
[navit-package] / src / maptype.c
1 #include <glib.h>
2 #include "projection.h"
3 #include "map.h"
4 #include "maptype.h"
5
6 static struct maptype *maptype_root;
7
8 void
9 maptype_register(char *name, struct map_priv *(*map_new)(struct map_methods *meth, char *data, char **charset, enum projection *pro))
10 {
11         struct maptype *mt;
12         mt=g_new(struct maptype, 1);
13         mt->name=g_strdup(name);
14         mt->map_new=map_new;
15         mt->next=maptype_root;
16         maptype_root=mt;        
17 }
18
19 struct maptype *
20 maptype_get(const char *name)
21 {
22         struct maptype *mt=maptype_root;
23
24         while (mt) {
25                 if (!g_ascii_strcasecmp(mt->name, name))
26                         return mt;
27                 mt=mt->next;
28         }
29         return NULL;
30 }