klass->get_tilesize_x = NULL;
klass->get_tilesize_y = NULL;
klass->get_drawmode = NULL;
+ klass->is_direct_file_access = NULL;
klass->supports_download_only_new = _supports_download_only_new;
klass->coord_to_mapcoord = NULL;
klass->mapcoord_to_center_coord = NULL;
return (*klass->get_drawmode)(self);
}
+/**
+ * vik_map_source_is_direct_file_access:
+ * @self: the VikMapSource of interest.
+ *
+ * Return true when we can bypass all this download malarky
+ * Treat the files as a pre generated data set in OSM tile server layout: <tiledir>/%d/%d/%d.png
+ */
+gboolean
+vik_map_source_is_direct_file_access (VikMapSource * self)
+{
+ VikMapSourceClass *klass;
+ g_return_val_if_fail (self != NULL, 0);
+ g_return_val_if_fail (VIK_IS_MAP_SOURCE (self), 0);
+ klass = VIK_MAP_SOURCE_GET_CLASS(self);
+
+ g_return_val_if_fail (klass->is_direct_file_access != NULL, 0);
+
+ return (*klass->is_direct_file_access)(self);
+}
+
gboolean
vik_map_source_supports_download_only_new (VikMapSource * self)
{