#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_PATTERN_1 "{center:{lat:"
+#define GOOGLE_SEARCH_PATTERN_2 ",lng:"
static gchar *last_search_str = NULL;
static VikCoord *last_coord = NULL;
static gchar *last_successful_search_str = NULL;
+static DownloadOptions googlesearch_options = { 0, "http://maps.google.com/" };
+
gchar * a_googlesearch_get_search_string_for_this_place(VikWindow *vw)
{
if (!last_coord)
uri = g_strdup_printf(GOOGLE_SEARCH_URL_FMT, escaped_srch_str);
/* TODO: curl may not be available */
- if (curl_download_uri(uri, tmp_file)) { /* error */
+ if (curl_download_uri(uri, tmp_file, &googlesearch_options)) { /* error */
fprintf(stderr, "DEBUG: %s() download error\n", __PRETTY_FUNCTION__);
fclose(tmp_file);
ret = -1;