*
* Copyright (C) 2003-2005, Evan Battaglia <gtoevan@gmx.net>
* Copyright (C) 2007,2013, Guilhem Bonnefille <guilhem.bonnefille@gmail.com>
- * Copyright (c) 2012, Rob Norris <rw_norris@hotmail.com>
+ * Copyright (c) 2012-2014, Rob Norris <rw_norris@hotmail.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 "vikwmscmapsource.h"
#include "vikwebtoolcenter.h"
#include "vikwebtoolbounds.h"
+#include "vikwebtoolformat.h"
#include "vikwebtool_datasource.h"
#include "vikexttools.h"
#include "vikexttool_datasources.h"
VIK_MAP_SOURCE(g_object_new(VIK_TYPE_SLIPPY_MAP_SOURCE,
"id", 13,
"label", "OpenStreetMap (Mapnik)",
+ "name", "OSM-Mapnik",
"hostname", "tile.openstreetmap.org",
"url", "/%d/%d/%d.png",
"check-file-server-time", FALSE,
"use-etag", TRUE,
+ "zoom-min", 0,
+ "zoom-max", 19,
"copyright", "© OpenStreetMap contributors",
"license", "CC-BY-SA",
"license-url", "http://www.openstreetmap.org/copyright",
VIK_MAP_SOURCE(g_object_new(VIK_TYPE_SLIPPY_MAP_SOURCE,
"id", 17,
"label", "OpenStreetMap (Cycle)",
- "hostname", "b.tile.opencyclemap.org",
+ "name", "OSM-Cycle",
+ "hostname", "tile.opencyclemap.org",
"url", "/cycle/%d/%d/%d.png",
"check-file-server-time", TRUE,
"use-etag", FALSE,
+ "zoom-min", 0,
+ "zoom-max", 18,
"copyright", "Tiles courtesy of Andy Allan © OpenStreetMap contributors",
"license", "CC-BY-SA",
"license-url", "http://www.openstreetmap.org/copyright",
VIK_MAP_SOURCE(g_object_new(VIK_TYPE_SLIPPY_MAP_SOURCE,
"id", 20,
"label", "OpenStreetMap (Transport)",
- "hostname", "c.tile2.opencyclemap.org",
+ "name", "OSM-Transport",
+ "hostname", "tile2.opencyclemap.org",
"url", "/transport/%d/%d/%d.png",
"check-file-server-time", TRUE,
"use-etag", FALSE,
+ "zoom-min", 0,
+ "zoom-max", 18,
"copyright", "Tiles courtesy of Andy Allan © OpenStreetMap contributors",
"license", "CC-BY-SA",
"license-url", "http://www.openstreetmap.org/copyright",
VikMapSource *mapquest_type =
VIK_MAP_SOURCE(g_object_new(VIK_TYPE_SLIPPY_MAP_SOURCE,
"id", 19,
+ "name", "OSM-MapQuest",
"label", "OpenStreetMap (MapQuest)",
"hostname", "otile1.mqcdn.com",
"url", "/tiles/1.0.0/osm/%d/%d/%d.png",
"check-file-server-time", TRUE,
"use-etag", FALSE,
+ "zoom-min", 0,
+ "zoom-max", 19,
"copyright", "Tiles Courtesy of MapQuest © OpenStreetMap contributors",
"license", "MapQuest Specific",
"license-url", "http://developer.mapquest.com/web/info/terms-of-use",
VikMapSource *hot_type =
VIK_MAP_SOURCE(g_object_new(VIK_TYPE_SLIPPY_MAP_SOURCE,
"id", 22,
+ "name", "OSM-Humanitarian",
"label", "OpenStreetMap (Humanitarian)",
"hostname", "c.tile.openstreetmap.fr",
"url", "/hot/%d/%d/%d.png",
"check-file-server-time", TRUE,
"use-etag", FALSE,
+ "zoom-min", 0,
+ "zoom-max", 20, // Super detail!!
"copyright", "© OpenStreetMap contributors. Tiles courtesy of Humanitarian OpenStreetMap Team",
"license", "CC-BY-SA",
"license-url", "http://www.openstreetmap.org/copyright",
"is-mbtiles", TRUE,
NULL));
+ // NB no cache needed for this type!!
+ VikMapSource *metatiles_type =
+ VIK_MAP_SOURCE(g_object_new(VIK_TYPE_SLIPPY_MAP_SOURCE,
+ "id", 24,
+ "label", _("OSM Metatiles"),
+ // For using your own generated data assumed you know the license already!
+ "copyright", "© OpenStreetMap contributors", // probably
+ "use-direct-file-access", TRUE,
+ "is-osm-meta-tiles", TRUE,
+ NULL));
+
maps_layer_register_map_source (mapquest_type);
maps_layer_register_map_source (mapnik_type);
maps_layer_register_map_source (cycle_type);
maps_layer_register_map_source (hot_type);
maps_layer_register_map_source (direct_type);
maps_layer_register_map_source (mbtiles_type);
+ maps_layer_register_map_source (metatiles_type);
// Webtools
VikWebtoolCenter *webtool = NULL;
vik_ext_tools_register ( VIK_EXT_TOOL ( webtoolbounds ) );
g_object_unref ( webtoolbounds );
+ VikWebtoolFormat *vwtf = NULL;
+ vwtf = vik_webtool_format_new_with_members ( _("Geofabrik Map Compare"),
+ "http://tools.geofabrik.de/mc/#%s/%s/%s",
+ "ZAO" );
+ vik_ext_tools_register ( VIK_EXT_TOOL ( vwtf ) );
+ g_object_unref ( vwtf );
+
// Datasource
VikWebtoolDatasource *vwtds = NULL;
- vwtds = vik_webtool_datasource_new_with_members ( _("OpenStreetMap Notes"), "http://api.openstreetmap.org/api/0.6/notes.gpx?bbox=%s,%s,%s,%s&closed=0", "LBRT", NULL );
+ vwtds = vik_webtool_datasource_new_with_members ( _("OpenStreetMap Notes"), "http://api.openstreetmap.org/api/0.6/notes.gpx?bbox=%s,%s,%s,%s&closed=0", "LBRT", NULL, NULL, NULL );
vik_ext_tool_datasources_register ( VIK_EXT_TOOL ( vwtds ) );
g_object_unref ( vwtds );