/*
- * Copyright (C) 2009-2010 Andy Spencer <andy753421@gmail.com>
+ * Copyright (C) 2009-2011 Andy Spencer <andy753421@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
#include <time.h>
#include <glib/gstdio.h>
-#include <GL/gl.h>
#include <grits.h>
#include "map.h"
-#define MAX_RESOLUTION 500
+#define MAX_RESOLUTION 100
#define TILE_WIDTH 1024
#define TILE_HEIGHT 512
static const guchar colormap[][2][4] = {
- {{0x73, 0x91, 0xad}, {0x73, 0x91, 0xad, 0x20}}, // Oceans
+ {{0x73, 0x91, 0xad}, {0x73, 0x91, 0xad, 0x00}}, // Oceans
{{0xf6, 0xee, 0xee}, {0xf6, 0xee, 0xee, 0x00}}, // Ground
{{0xff, 0xff, 0xff}, {0xff, 0xff, 0xff, 0xff}}, // Borders
{{0x73, 0x93, 0xad}, {0x73, 0x93, 0xad, 0x40}}, // Lakes
map->threads = g_thread_pool_new(_update_tiles, map, 1, FALSE, NULL);
map->tiles = grits_tile_new(NULL, NORTH, SOUTH, EAST, WEST);
map->wms = grits_wms_new(
- "http://labs.metacarta.com/wms/vmap0", "basic", "image/png",
- "osm/", "png", TILE_WIDTH, TILE_HEIGHT);
+ "http://vmap0.tiles.osgeo.org/wms/vmap0",
+ "basic,priroad,secroad,depthcontour,clabel,statelabel",
+ "image/png", "osm/", "png", TILE_WIDTH, TILE_HEIGHT);
g_object_ref(map->tiles);
}
static void grits_plugin_map_dispose(GObject *gobject)
/* Drop references */
if (map->viewer) {
g_signal_handler_disconnect(map->viewer, map->sigid);
- grits_viewer_remove(map->viewer, map->tiles);
+ grits_viewer_remove(map->viewer, GRITS_OBJECT(map->tiles));
soup_session_abort(map->wms->http->soup);
g_thread_pool_free(map->threads, TRUE, TRUE);
while (gtk_events_pending())