-
-static gboolean terraserver_topo_coord_to_mapcoord ( const VikCoord *src, gdouble xmpp, gdouble ympp, MapCoord *dest )
-{ return terraserver_coord_to_mapcoord ( src, xmpp, ympp, dest, 2 ); }
-static gboolean terraserver_aerial_coord_to_mapcoord ( const VikCoord *src, gdouble xmpp, gdouble ympp, MapCoord *dest )
-{ return terraserver_coord_to_mapcoord ( src, xmpp, ympp, dest, 1 ); }
-static gboolean terraserver_urban_coord_to_mapcoord ( const VikCoord *src, gdouble xmpp, gdouble ympp, MapCoord *dest )
-{ return terraserver_coord_to_mapcoord ( src, xmpp, ympp, dest, 4 ); }
-
-static void terraserver_mapcoord_to_center_coord ( MapCoord *src, VikCoord *dest )
-{
- // FIXME: slowdown here!
- gdouble mpp = scale_to_mpp ( src->scale );
- dest->mode = VIK_COORD_UTM;
- dest->utm_zone = src->z;
- dest->east_west = ((src->x * 200) + 100) * mpp;
- dest->north_south = ((src->y * 200) + 100) * mpp;
-}
-
-static int terraserver_download ( MapCoord *src, const gchar *dest_fn, guint8 type )
-{
- int res = -1;
- gchar *uri = g_strdup_printf ( "/tile.ashx?T=%d&S=%d&X=%d&Y=%d&Z=%d", type,
- src->scale, src->x, src->y, src->z );
- res = a_http_download_get_url_nohostname ( TERRASERVER_SITE, uri, dest_fn );
- g_free ( uri );
- return(res);
-}
-
-static int terraserver_topo_download ( MapCoord *src, const gchar *dest_fn )
-{ return terraserver_download ( src, dest_fn, 2 ); }
-static int terraserver_aerial_download ( MapCoord *src, const gchar *dest_fn )
-{ return terraserver_download ( src, dest_fn, 1 ); }
-static int terraserver_urban_download ( MapCoord *src, const gchar *dest_fn )
-{ return terraserver_download ( src, dest_fn, 4 ); }