From c933a90b846685bccd95fe647430ca57fcae3b81 Mon Sep 17 00:00:00 2001 From: Pierre-Luc Beaudoin Date: Sat, 28 Feb 2009 23:54:18 +0200 Subject: [PATCH] Add OpenArialMap --- champlain/champlain-map-source.c | 30 +++++++++++++++++++++++++++++- champlain/champlain-map-source.h | 2 ++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/champlain/champlain-map-source.c b/champlain/champlain-map-source.c index 647b657..2fc8c72 100644 --- a/champlain/champlain-map-source.c +++ b/champlain/champlain-map-source.c @@ -389,7 +389,8 @@ ChamplainMapSource * champlain_map_source_new_osm_mapnik () { champlain_map_source_new_network ("OpenStreetMap Mapnik", - "(CC) by contributors", "", 0, 18, 256, + "(CC) BY 2.0 OpenStreetMap contributors", + "http://creativecommons.org/licenses/by/2.0/", 0, 18, 256, CHAMPLAIN_MAP_PROJECTION_MERCATOR, "http://tile.openstreetmap.org/%d/%d/%d.png", CHAMPLAIN_MAP_SOURCE_PARAMETER_Z, @@ -397,6 +398,33 @@ champlain_map_source_new_osm_mapnik () CHAMPLAIN_MAP_SOURCE_PARAMETER_Y); } +ChamplainMapSource * +champlain_map_source_new_oam () +{ + champlain_map_source_new_network ("OpenArialMap", + "(CC) BY 3.0 OpenArialMap contributors", + "http://creativecommons.org/licenses/by/3.0/", 0, 17, 256, + CHAMPLAIN_MAP_PROJECTION_MERCATOR, + "http://tile.openaerialmap.org/tiles/1.0.0/openaerialmap-900913/%d/%d/%d.jpg", + CHAMPLAIN_MAP_SOURCE_PARAMETER_Z, + CHAMPLAIN_MAP_SOURCE_PARAMETER_X, + CHAMPLAIN_MAP_SOURCE_PARAMETER_Y); +} + +//FIXME: the API isn't enough flexible for mff's url! +ChamplainMapSource * +champlain_map_source_new_mff_relief () +{ + champlain_map_source_new_network ("MapsForFree Relief", + "Map data available under GNU Free Documentation license, Version 1.2 or later", + "http://www.gnu.org/copyleft/fdl.html", 0, 11, 256, + CHAMPLAIN_MAP_PROJECTION_MERCATOR, + "http://maps-for-free.com/layer/relief/z%d/row%d/%d_%d-%d.jpg", + CHAMPLAIN_MAP_SOURCE_PARAMETER_Z, + CHAMPLAIN_MAP_SOURCE_PARAMETER_X, + CHAMPLAIN_MAP_SOURCE_PARAMETER_Y); +} + guint champlain_map_source_get_x (ChamplainMapSource *map_source, gint zoom_level, diff --git a/champlain/champlain-map-source.h b/champlain/champlain-map-source.h index 0c30cc1..e4b3471 100644 --- a/champlain/champlain-map-source.h +++ b/champlain/champlain-map-source.h @@ -85,6 +85,8 @@ void champlain_map_source_set_tile_uri (ChamplainMapSource *map_source, ChamplainMapSourceParameter second, ChamplainMapSourceParameter third); ChamplainMapSource * champlain_map_source_new_osm_mapnik (); +ChamplainMapSource * champlain_map_source_new_oam (); +ChamplainMapSource * champlain_map_source_new_mff_relief (); guint champlain_map_source_get_x (ChamplainMapSource *map_source, gint zoom_level, gdouble longitude); -- 2.39.5