]> git.street.me.uk Git - andy/viking.git/commitdiff
Correct google gobject
author(null) <(null)>
Thu, 4 Sep 2008 17:18:47 +0000 (19:18 +0200)
committerGuilhem Bonnefille <guilhem.bonnefille@gmail.com>
Fri, 27 Mar 2009 11:14:39 +0000 (12:14 +0100)
src/google-map-type.gob

index a5cff3384eccae4a76bdbd19e5c77386984284a1..d19fb64edf1a9e8b6874ef9db2d753f6be7ba3c5 100644 (file)
@@ -42,6 +42,8 @@ typedef enum {
 
 %{
 
+static DownloadOptions google_options = { "http://maps.google.com/", 0, a_check_map_file };
+
 /* 1 << (x) is like a 2**(x) */
 #define GZ(x) ((1<<x))
 
@@ -183,6 +185,15 @@ failed:
   return (vers[google_type]);
 }
 
+static int real_google_download ( MapCoord *src, const gchar *dest_fn, const char *verstr )
+{
+   int res;
+   gchar *uri = g_strdup_printf ( "/mt?n=404&v=%s&x=%d&y=%d&zoom=%d", verstr, src->x, src->y, src->scale );
+   res = a_http_download_get_url ( "mt.google.com", uri, dest_fn, &google_options );
+   g_free ( uri );
+   return res;
+}
+
 %}
 
 class Google:Map:Type from Vik:Map:Type {