[libchamplain] Add parameters to map sources constructors
- From: Pierre-Luc Beaudoin <plbeaudoin src gnome org>
- To: svn-commits-list gnome org
- Subject: [libchamplain] Add parameters to map sources constructors
- Date: Fri, 12 Jun 2009 01:00:03 -0400 (EDT)
commit bee0880850542260b409f320de98e26e83e21d0d
Author: Emmanuel Rodriguez <emmanuel rodriguez gmail com>
Date: Thu Jun 11 23:35:01 2009 -0400
Add parameters to map sources constructors
champlain/champlain-map-source-desc.h | 1 +
champlain/champlain-map-source-factory.c | 19 ++++++++++++-------
champlain/champlain-map-source-factory.h | 2 +-
3 files changed, 14 insertions(+), 8 deletions(-)
---
diff --git a/champlain/champlain-map-source-desc.h b/champlain/champlain-map-source-desc.h
index e0113a8..32cf5f1 100644
--- a/champlain/champlain-map-source-desc.h
+++ b/champlain/champlain-map-source-desc.h
@@ -61,6 +61,7 @@ struct _ChamplainMapSourceDesc {
gint max_zoom_level;
ChamplainMapProjection projection;
ChamplainMapSourceConstructor constructor;
+ gchar *uri_format;
gpointer data;
};
diff --git a/champlain/champlain-map-source-factory.c b/champlain/champlain-map-source-factory.c
index 0245b52..a1d010d 100644
--- a/champlain/champlain-map-source-factory.c
+++ b/champlain/champlain-map-source-factory.c
@@ -166,7 +166,8 @@ ChamplainMapSourceDesc OSM_MAPNIK_DESC =
18,
CHAMPLAIN_MAP_PROJECTION_MERCATOR,
champlain_map_source_new_generic,
- "http://tile.openstreetmap.org/#Z#/#X#/#Y#.png"
+ "http://tile.openstreetmap.org/#Z#/#X#/#Y#.png",
+ NULL
};
static
@@ -180,7 +181,8 @@ ChamplainMapSourceDesc OSM_OSMARENDER_DESC =
18,
CHAMPLAIN_MAP_PROJECTION_MERCATOR,
champlain_map_source_new_generic,
- "http://tah.openstreetmap.org/Tiles/tile/#Z#/#X#/#Y#.png"
+ "http://tah.openstreetmap.org/Tiles/tile/#Z#/#X#/#Y#.png",
+ NULL
};
static
@@ -194,7 +196,8 @@ ChamplainMapSourceDesc OSM_CYCLEMAP_DESC =
18,
CHAMPLAIN_MAP_PROJECTION_MERCATOR,
champlain_map_source_new_generic,
- "http://andy.sandbox.cloudmade.com/tiles/cycle/#Z#/#X#/#Y#.png"
+ "http://andy.sandbox.cloudmade.com/tiles/cycle/#Z#/#X#/#Y#.png",
+ NULL
};
static
@@ -208,7 +211,8 @@ ChamplainMapSourceDesc OAM_DESC =
17,
CHAMPLAIN_MAP_PROJECTION_MERCATOR,
champlain_map_source_new_generic,
- "http://tile.openaerialmap.org/tiles/1.0.0/openaerialmap-900913/#Z#/#X#/#Y#.jpg"
+ "http://tile.openaerialmap.org/tiles/1.0.0/openaerialmap-900913/#Z#/#X#/#Y#.jpg",
+ NULL
};
static
@@ -222,7 +226,8 @@ ChamplainMapSourceDesc MFF_RELIEF_DESC =
11,
CHAMPLAIN_MAP_PROJECTION_MERCATOR,
champlain_map_source_new_generic,
- "http://maps-for-free.com/layer/relief/z#Z#/row#Y#/#Z#_#X#-#Y#.jpg"
+ "http://maps-for-free.com/layer/relief/z#Z#/row#Y#/#Z#_#X#-#Y#.jpg",
+ NULL
};
static void
@@ -345,7 +350,7 @@ champlain_map_source_factory_register (ChamplainMapSourceFactory *factory,
static ChamplainMapSource *
champlain_map_source_new_generic (
- ChamplainMapSourceDesc *desc, gpointer data)
+ ChamplainMapSourceDesc *desc, gpointer user_data)
{
return CHAMPLAIN_MAP_SOURCE (champlain_network_map_source_new_full (
desc->id,
@@ -356,5 +361,5 @@ champlain_map_source_new_generic (
desc->max_zoom_level,
256,
desc->projection,
- (const gchar *)desc->data));
+ desc->uri_format));
}
diff --git a/champlain/champlain-map-source-factory.h b/champlain/champlain-map-source-factory.h
index e0bfb93..8bd869e 100644
--- a/champlain/champlain-map-source-factory.h
+++ b/champlain/champlain-map-source-factory.h
@@ -67,7 +67,7 @@ ChamplainMapSource * champlain_map_source_factory_create (ChamplainMapSourceFact
gboolean
champlain_map_source_factory_register (ChamplainMapSourceFactory *factory,
ChamplainMapSourceDesc *desc, ChamplainMapSourceConstructor constructor,
- gpointer data);
+ gpointer user_data);
#define CHAMPLAIN_MAP_SOURCE_OSM_MAPNIK "osm::mapnik"
#define CHAMPLAIN_MAP_SOURCE_OSM_OSMARENDER "osm::osmarender"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]