g_free(m);
g_hash_table_destroy(m->item_hash);
quadtree_destroy(m->tree_root);
+ g_free(m->filename);
}
static void
return g_hash_table_lookup(mr->m->item_hash,&id_lo);
}
+static int
+csv_get_attr(struct map_priv *m, enum attr_type type, struct attr *attr)
+{
+ attr->type=type;
+ switch (type) {
+ case attr_map_release:
+ attr->u.str = g_strdup_printf("csv:%s",m->filename?m->filename:"");
+ return 1;
+ break;
+ default:
+ break;
+ }
+ return 0;
+}
+
+
static struct map_methods map_methods_csv = {
projection_mg,
"iso8859-1",
map_rect_destroy_csv,
map_rect_get_item_csv,
map_rect_get_item_byid_csv,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ csv_get_attr,
};
static struct map_priv *
}
}
fclose(fp);
+ m->filename = g_strdup(data->u.str);
}
else {
return NULL;