[libchamplain] Deprecate CHAMPLAIN_MAP_SOURCE_OSM_MAPQUEST and CHAMPLAIN_MAP_SOURCE_OSM_AERIAL_MAP
- From: Jiří Techet <jiritechet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libchamplain] Deprecate CHAMPLAIN_MAP_SOURCE_OSM_MAPQUEST and CHAMPLAIN_MAP_SOURCE_OSM_AERIAL_MAP
- Date: Wed, 13 Jul 2016 18:27:30 +0000 (UTC)
commit af75b6408465ece6e7ef902c550b98052c08fa9b
Author: Jiří Techet <techet gmail com>
Date: Wed Jul 13 20:19:03 2016 +0200
Deprecate CHAMPLAIN_MAP_SOURCE_OSM_MAPQUEST and CHAMPLAIN_MAP_SOURCE_OSM_AERIAL_MAP
These map sources don't work any more. Don't register them in the factory
and mark the definition macros as deprecated.
champlain/champlain-0.12.vapi | 1 +
champlain/champlain-map-source-factory.c | 119 +++++++++++++++---------------
champlain/champlain-map-source-factory.h | 19 +++--
3 files changed, 72 insertions(+), 67 deletions(-)
---
diff --git a/champlain/champlain-0.12.vapi b/champlain/champlain-0.12.vapi
index f8ca290..5d64dde 100644
--- a/champlain/champlain-0.12.vapi
+++ b/champlain/champlain-0.12.vapi
@@ -641,6 +641,7 @@ namespace Champlain {
[CCode (cheader_filename = "champlain/champlain.h", cname = "CHAMPLAIN_MAP_SOURCE_OSM_MAPNIK")]
public const string MAP_SOURCE_OSM_MAPNIK;
[CCode (cheader_filename = "champlain/champlain.h", cname = "CHAMPLAIN_MAP_SOURCE_OSM_MAPQUEST")]
+ [Deprecated]
public const string MAP_SOURCE_OSM_MAPQUEST;
[CCode (cheader_filename = "champlain/champlain.h", cname = "CHAMPLAIN_MAP_SOURCE_OSM_OSMARENDER")]
[Deprecated]
diff --git a/champlain/champlain-map-source-factory.c b/champlain/champlain-map-source-factory.c
index c86aa11..234d3cc 100644
--- a/champlain/champlain-map-source-factory.c
+++ b/champlain/champlain-map-source-factory.c
@@ -162,34 +162,6 @@ champlain_map_source_factory_init (ChamplainMapSourceFactory *factory)
champlain_map_source_factory_register (factory, desc);
desc = champlain_map_source_desc_new_full (
- CHAMPLAIN_MAP_SOURCE_OSM_MAPQUEST,
- "MapQuest OSM",
- "Data, imagery and map information provided by MapQuest, Open Street Map and contributors",
- "http://creativecommons.org/licenses/by-sa/2.0/",
- 0,
- 17,
- 256,
- CHAMPLAIN_MAP_PROJECTION_MERCATOR,
- "https://otile1.mqcdn.com/tiles/1.0.0/osm/#Z#/#X#/#Y#.png",
- champlain_map_source_new_generic,
- NULL);
- champlain_map_source_factory_register (factory, desc);
-
- desc = champlain_map_source_desc_new_full (
- CHAMPLAIN_MAP_SOURCE_OSM_AERIAL_MAP,
- "MapQuest Open Aerial",
- "Map data is CC-BY-SA 2.0 OpenStreetMap contributors",
- "http://creativecommons.org/licenses/by-sa/2.0/",
- 0,
- 18,
- 256,
- CHAMPLAIN_MAP_PROJECTION_MERCATOR,
- "https://otile1.mqcdn.com/tiles/1.0.0/sat/#Z#/#X#/#Y#.jpg",
- champlain_map_source_new_generic,
- NULL);
- champlain_map_source_factory_register (factory, desc);
-
- desc = champlain_map_source_desc_new_full (
CHAMPLAIN_MAP_SOURCE_OSM_CYCLE_MAP,
"OpenStreetMap Cycle Map",
"Map data is CC-BY-SA 2.0 OpenStreetMap contributors",
@@ -217,37 +189,6 @@ champlain_map_source_factory_init (ChamplainMapSourceFactory *factory)
NULL);
champlain_map_source_factory_register (factory, desc);
-/* Not available any more - remove completely in the next release */
-#if 0
- desc = champlain_map_source_desc_new_full (
- CHAMPLAIN_MAP_SOURCE_OAM,
- "OpenAerialMap",
- "(CC) BY 3.0 OpenAerialMap 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/#Z#/#X#/#Y#.jpg",
- champlain_map_source_new_generic,
- NULL);
- champlain_map_source_factory_register (factory, desc);
-
- desc = champlain_map_source_desc_new_full (
- CHAMPLAIN_MAP_SOURCE_OSM_OSMARENDER,
- "OpenStreetMap Osmarender",
- "Map data is CC-BY-SA 2.0 OpenStreetMap contributors",
- "http://creativecommons.org/licenses/by-sa/2.0/",
- 0,
- 17,
- 256,
- CHAMPLAIN_MAP_PROJECTION_MERCATOR,
- "http://a.tah.openstreetmap.org/Tiles/tile/#Z#/#X#/#Y#.png",
- champlain_map_source_new_generic,
- NULL);
- champlain_map_source_factory_register (factory, desc);
-#endif
-
desc = champlain_map_source_desc_new_full (
CHAMPLAIN_MAP_SOURCE_MFF_RELIEF,
"Maps for Free Relief",
@@ -361,6 +302,66 @@ champlain_map_source_factory_init (ChamplainMapSourceFactory *factory)
NULL);
champlain_map_source_factory_register (factory, desc);
#endif
+
+/* Not available any more - remove completely in the next release */
+#if 0
+ desc = champlain_map_source_desc_new_full (
+ CHAMPLAIN_MAP_SOURCE_OSM_AERIAL_MAP,
+ "MapQuest Open Aerial",
+ "Map data is CC-BY-SA 2.0 OpenStreetMap contributors",
+ "http://creativecommons.org/licenses/by-sa/2.0/",
+ 0,
+ 18,
+ 256,
+ CHAMPLAIN_MAP_PROJECTION_MERCATOR,
+ "https://otile1.mqcdn.com/tiles/1.0.0/sat/#Z#/#X#/#Y#.jpg",
+ champlain_map_source_new_generic,
+ NULL);
+ champlain_map_source_factory_register (factory, desc);
+
+ desc = champlain_map_source_desc_new_full (
+ CHAMPLAIN_MAP_SOURCE_OSM_MAPQUEST,
+ "MapQuest OSM",
+ "Data, imagery and map information provided by MapQuest, Open Street Map and contributors",
+ "http://creativecommons.org/licenses/by-sa/2.0/",
+ 0,
+ 17,
+ 256,
+ CHAMPLAIN_MAP_PROJECTION_MERCATOR,
+ "https://otile1.mqcdn.com/tiles/1.0.0/osm/#Z#/#X#/#Y#.png",
+ champlain_map_source_new_generic,
+ NULL);
+ champlain_map_source_factory_register (factory, desc);
+
+ desc = champlain_map_source_desc_new_full (
+ CHAMPLAIN_MAP_SOURCE_OAM,
+ "OpenAerialMap",
+ "(CC) BY 3.0 OpenAerialMap 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/#Z#/#X#/#Y#.jpg",
+ champlain_map_source_new_generic,
+ NULL);
+ champlain_map_source_factory_register (factory, desc);
+
+ desc = champlain_map_source_desc_new_full (
+ CHAMPLAIN_MAP_SOURCE_OSM_OSMARENDER,
+ "OpenStreetMap Osmarender",
+ "Map data is CC-BY-SA 2.0 OpenStreetMap contributors",
+ "http://creativecommons.org/licenses/by-sa/2.0/",
+ 0,
+ 17,
+ 256,
+ CHAMPLAIN_MAP_PROJECTION_MERCATOR,
+ "http://a.tah.openstreetmap.org/Tiles/tile/#Z#/#X#/#Y#.png",
+ champlain_map_source_new_generic,
+ NULL);
+ champlain_map_source_factory_register (factory, desc);
+#endif
+
}
diff --git a/champlain/champlain-map-source-factory.h b/champlain/champlain-map-source-factory.h
index f430e6a..a75bf15 100644
--- a/champlain/champlain-map-source-factory.h
+++ b/champlain/champlain-map-source-factory.h
@@ -91,12 +91,6 @@ gboolean champlain_map_source_factory_register (ChamplainMapSourceFactory *facto
ChamplainMapSourceDesc *desc);
GSList *champlain_map_source_factory_get_registered (ChamplainMapSourceFactory *factory);
-/**
- * CHAMPLAIN_MAP_SOURCE_OSM_MAPNIK:
- *
- * OpenStreetMap Mapnik
- */
-#define CHAMPLAIN_MAP_SOURCE_OSM_MAPNIK "osm-mapnik"
#ifndef GTK_DISABLE_DEPRECATED
/**
* CHAMPLAIN_MAP_SOURCE_OSM_OSMARENDER:
@@ -118,11 +112,12 @@ GSList *champlain_map_source_factory_get_registered (ChamplainMapSourceFactory *
* return any source.
*/
#define CHAMPLAIN_MAP_SOURCE_OAM "OpenAerialMap"
-#endif
/**
* CHAMPLAIN_MAP_SOURCE_OSM_MAPQUEST:
*
- * Mapquest OpenStreetMap
+ * Deprecated: Mapquest isn't available any more and will be removed in the next release.
+ * As it doens't exist, it isn't registered to the factory and the 'create' method won't
+ * return any source.
*/
#define CHAMPLAIN_MAP_SOURCE_OSM_MAPQUEST "osm-mapquest"
/**
@@ -131,6 +126,14 @@ GSList *champlain_map_source_factory_get_registered (ChamplainMapSourceFactory *
* Mapquest Open Aerial
*/
#define CHAMPLAIN_MAP_SOURCE_OSM_AERIAL_MAP "osm-aerialmap"
+#endif
+
+/**
+ * CHAMPLAIN_MAP_SOURCE_OSM_MAPNIK:
+ *
+ * OpenStreetMap Mapnik
+ */
+#define CHAMPLAIN_MAP_SOURCE_OSM_MAPNIK "osm-mapnik"
/**
* CHAMPLAIN_MAP_SOURCE_OSM_CYCLE_MAP:
*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]