repo->type = REPOTYPE_QUAD_QRST;
else if(strstr(url, "%0d"))
repo->type = REPOTYPE_XYZ_INV;
+ else if(strstr(url, "%-d"))
+ repo->type = REPOTYPE_XYZ_SIGNED;
else if(strstr(url, "%0s"))
repo->type = REPOTYPE_QUAD_ZERO;
else
map_construct_url(RepoData *repo, gint zoom, gint tilex, gint tiley)
{
gchar *retval;
- vprintf("%s()\n", __PRETTY_FUNCTION__);
+ vprintf("%s(%p, %d, %d, %d)\n", __PRETTY_FUNCTION__,
+ repo, zoom, tilex, tiley);
switch(repo->type)
{
case REPOTYPE_XYZ:
MAX_ZOOM + 1 - zoom, tilex, tiley);
break;
+ case REPOTYPE_XYZ_SIGNED:
+ retval = g_strdup_printf(repo->url,
+ tilex,
+ (1 << (MAX_ZOOM - zoom)) - tiley - 1,
+ zoom - (MAX_ZOOM - 17));
+ break;
+
case REPOTYPE_QUAD_QRST:
{
gchar location[MAX_ZOOM + 2];
{
REPOTYPE_NONE, /* No URL set. */
REPOTYPE_XYZ, /* x=%d, y=%d, and zoom=%d */
+ REPOTYPE_XYZ_SIGNED, /* x=%d, y=%d, and zoom=%d-2 */
REPOTYPE_XYZ_INV, /* zoom=%0d, x=%d, y=%d */
REPOTYPE_QUAD_QRST, /* t=%s (%s = {qrst}*) */
REPOTYPE_QUAD_ZERO, /* t=%0s (%0s = {0123}*) */