I spent some time checking today to see in what cases a_check_html_file() was used. It "appears" to be used only in the "magic scissors" case, but since I don't really know the code that well I could be wrong. Be forewarned ---
If this is true, it seemed that adding a condition to a_check_html_file() that would allow the kml file to pass the test would be better than not checking at all. For those that prefer that approach I've included that version of the patch inline below. Still -- this is just fodder for those who maintain viking to help get magic scissors fixed. BTW -- on a totally different subject -- it would be nice if viking could remember your file cache directory and if you've set UTM instead of Mercator. Presently it only remembers if you load a file with these settings. I'd like it to come up that way -- something in ~/.viking maybe? It would also be nice if it could get georeferencing data out of the tif file for geotiffs instead of the reference file that comes with them. The data is in the geotiff tif file itself. Thanks for a nice program in spite of these requests... Harry ======================== Cut Here =========================== *** ./viking-0.9.9/src/googlesearch.c.orig Tue Sep 8 14:42:35 2009 --- ./viking-0.9.9/src/googlesearch.c Sun Sep 13 22:16:15 2009 *************** *** 34,40 **** #include "util.h" #include "curl_download.h" ! #define GOOGLE_SEARCH_URL_FMT "http://maps.google.com/maps?q=%s&output=js" #define GOOGLE_SEARCH_PATTERN_1 "{center:{lat:" #define GOOGLE_SEARCH_PATTERN_2 ",lng:" #define GOOGLE_SEARCH_NOT_FOUND "not understand the location" --- 34,40 ---- #include "util.h" #include "curl_download.h" ! #define GOOGLE_SEARCH_URL_FMT "http://maps.google.com/maps?q=%s&output=kml" #define GOOGLE_SEARCH_PATTERN_1 "{center:{lat:" #define GOOGLE_SEARCH_PATTERN_2 ",lng:" #define GOOGLE_SEARCH_NOT_FOUND "not understand the location" *** ./viking-0.9.9/src/datasource_google.c.orig Tue Sep 8 14:42:35 2009 --- ./viking-0.9.9/src/datasource_google.c Sun Sep 13 22:27:06 2009 *************** *** 31,37 **** #include "gpx.h" #include "acquire.h" ! #define GOOGLE_DIRECTIONS_STRING "maps.google.com/maps?q=from:%s+to:%s&output =js" typedef struct { GtkWidget *from_entry, *to_entry; --- 31,37 ---- #include "gpx.h" #include "acquire.h" ! #define GOOGLE_DIRECTIONS_STRING "maps.google.com/maps?q=from:%s+to:%s&output =kml" typedef struct { GtkWidget *from_entry, *to_entry; *************** *** 100,106 **** to_quoted = g_strjoinv( "%20", to_split); *cmd = g_strdup_printf( GOOGLE_DIRECTIONS_STRING, from_quoted, to_quoted ); ! *input_file_type = g_strdup("google"); g_free(last_from_str); g_free(last_to_str); --- 100,106 ---- to_quoted = g_strjoinv( "%20", to_split); *cmd = g_strdup_printf( GOOGLE_DIRECTIONS_STRING, from_quoted, to_quoted ); ! *input_file_type = g_strdup("kml"); g_free(last_from_str); g_free(last_to_str); *** ./viking-0.9.9/src/viktrwlayer.c.orig Wed Sep 9 14:16:18 2009 --- ./viking-0.9.9/src/viktrwlayer.c Sun Sep 13 23:38:24 2009 *************** *** 71,77 **** static g_hash_table_remove_all (GHashTable *ght) { g_hash_table_foreach_remove ( ght, (GHRFunc) return_true, FALSE ); } #endif ! #define GOOGLE_DIRECTIONS_STRING "maps.google.com/maps?q=from:%s,%s+to:%s,%s& output=js" #define VIK_TRW_LAYER_TRACK_GC 13 #define VIK_TRW_LAYER_TRACK_GC_RATES 10 #define VIK_TRW_LAYER_TRACK_GC_MIN 0 --- 71,77 ---- static g_hash_table_remove_all (GHashTable *ght) { g_hash_table_foreach_remove ( ght, (GHRFunc) return_true, FALSE ); } #endif ! #define GOOGLE_DIRECTIONS_STRING "maps.google.com/maps?q=from:%s,%s+to:%s,%s& output=kml" #define VIK_TRW_LAYER_TRACK_GC 13 #define VIK_TRW_LAYER_TRACK_GC_RATES 10 #define VIK_TRW_LAYER_TRACK_GC_MIN 0 *************** *** 3653,3659 **** g_ascii_dtostr (startlon, G_ASCII_DTOSTR_BUF_SIZE, (gdouble) start.lon), g_ascii_dtostr (endlat, G_ASCII_DTOSTR_BUF_SIZE, (gdouble) end.lat), g_ascii_dtostr (endlon, G_ASCII_DTOSTR_BUF_SIZE, (gdouble) end.lon)); ! a_babel_convert_from_url ( vtl, url, "google", NULL, NULL ); g_free ( url ); /* see if anything was done -- a track was added or appended to */ --- 3653,3659 ---- g_ascii_dtostr (startlon, G_ASCII_DTOSTR_BUF_SIZE, (gdouble) start.lon), g_ascii_dtostr (endlat, G_ASCII_DTOSTR_BUF_SIZE, (gdouble) end.lat), g_ascii_dtostr (endlon, G_ASCII_DTOSTR_BUF_SIZE, (gdouble) end.lon)); ! a_babel_convert_from_url ( vtl, url, "kml", NULL, NULL ); g_free ( url ); /* see if anything was done -- a track was added or appended to */ *** ./viking-0.9.9/src/download.c.orig Tue Sep 8 14:42:35 2009 --- ./viking-0.9.9/src/download.c Mon Sep 14 10:13:18 2009 *************** *** 46,51 **** --- 46,52 ---- "<!DOCTYPE html", "<head", "<title", + "<?xml", NULL }; ============================ Cut Here ============================ -- Harry G. McGavran, Jr. E-mail: w5...@arrl.net ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Viking-devel mailing list Viking-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/viking-devel Viking home page: http://viking.sf.net/