X-Git-Url: https://git.street.me.uk/andy/viking.git/blobdiff_plain/124ed81472bba381054f5c2502e1ba6ff9f1abcf..f40fb47d1dfb8e75b1a679ab2cc06980bbc8e647:/src/google-map-type.gob diff --git a/src/google-map-type.gob b/src/google-map-type.gob index a5cff338..bf3d84d7 100644 --- a/src/google-map-type.gob +++ b/src/google-map-type.gob @@ -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, 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 { private GoogleType type; + init (self) { + /* initialize the object here */ + self->tilesize_x = 256; + self->tilesize_y = 256; + self->drawmode = VIK_VIEWPORT_DRAWMODE_MERCATOR; + } + + public GObject * + new_with_id (guint8 id) { + GObject *ret = GET_NEW; + VIK_MAP_TYPE(ret)->uniq_id = id; + return G_OBJECT (ret); + } + + public GObject * + new (void) { + GObject *ret = GET_NEW; + return G_OBJECT (ret); + } + override (Vik:Map:Type) gboolean coord_to_mapcoord ( Vik:Map:Type *self, const VikCoord *src, gdouble xzoom, gdouble yzoom, MapCoord *dest ) {