]> git.street.me.uk Git - andy/viking.git/blobdiff - src/khmaps.c
Read hgt.zip files directly. Process correctly 1 arc sec hgt(.zip) files
[andy/viking.git] / src / khmaps.c
index 2896e69f97d7755bf8669c621e6ada1a3c3cfcb1..5921c98761ab26f4cab631bc6d0e39d29a011c2e 100644 (file)
 #include <gtk/gtk.h>
 #include <string.h>
 #include <math.h>
+#include "viking.h"
 #include "coords.h"
 #include "vikcoord.h"
 #include "mapcoord.h"
-#include "http.h"
+#include "download.h"
 #include "vikmapslayer.h"
 
 #include "khmaps.h"
 
+static DownloadOptions khmaps_options = { 1, NULL };
+
 void khmaps_init () {
   VikMapsLayer_MapType map_type = { 8, 256, 256, VIK_VIEWPORT_DRAWMODE_KH, khmaps_coord_to_mapcoord, khmaps_mapcoord_to_center_coord, khmaps_download };
 
@@ -126,7 +129,7 @@ void khmaps_download ( MapCoord *src, const gchar *dest_fn )
    gchar *uri = g_strdup_printf ( "/kh?v=2&t=%s", tmp );
    g_print("%d %d %d = %s\n", src->x, src->y, src->scale, uri);
    g_free ( tmp );
-   a_http_download_get_url ( "kh.google.com", uri, dest_fn );
+   a_http_download_get_url ( "kh.google.com", uri, dest_fn, &khmaps_options );
    g_free ( uri );
 }