[libchamplain] Add uri_format to the MapSourceDesc, it is now required



commit a167b57860ff06b17dbb635f0dc28a4c75e0eb69
Author: Emmanuel Rodriguez <emmanuel rodriguez gmail com>
Date:   Sun Jun 14 15:41:53 2009 +0200

    Add uri_format to the MapSourceDesc, it is now required

 .../perl/Champlain/t/ChamplainMapSourceFactory.t   |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/bindings/perl/Champlain/t/ChamplainMapSourceFactory.t b/bindings/perl/Champlain/t/ChamplainMapSourceFactory.t
index eec4726..6187228 100644
--- a/bindings/perl/Champlain/t/ChamplainMapSourceFactory.t
+++ b/bindings/perl/Champlain/t/ChamplainMapSourceFactory.t
@@ -82,6 +82,8 @@ sub test_map_register {
 		min_zoom_level => 0,
 		max_zoom_level => 11,
 		projection => 'mercator',
+		# This is a copy of OAM
+		uri_format => 'http://tile.openaerialmap.org/tiles/1.0.0/openaerialmap-900913/#Z#/#X#/#Y#.jpg',
 	};
 	
 	my $constructor = sub {
@@ -94,13 +96,12 @@ sub test_map_register {
 			$description->{max_zoom_level},
 			256,
 			$description->{projection},
-			# This is a copy of OAM
-			"http://tile.openaerialmap.org/tiles/1.0.0/openaerialmap-900913/#Z#/#X#/#Y#.jpg";,
+			$description->{uri_format},
 		);
 	};
 	$factory->register($description, $constructor);
 
-	my @new_maps = $factory->get_list();
+	my @new_maps = $factory->dup_list();
 	ok(@new_maps == @maps + 1, "Maps factory has an extra map");
 	
 	my $map = $factory->create('perl');
@@ -113,7 +114,7 @@ sub test_map_register {
 	is($map->get_max_zoom_level, $description->{max_zoom_level}, "Created map has the right max_zoom_level");
 	is($map->get_projection, $description->{projection}, "Created map has the right projection");
 	is($map->get_tile_size, 256, "Created map has the right tile_size");
-	is($map->get_tile_uri(1, 2, 3), "http://tile.openaerialmap.org/tiles/1.0.0/openaerialmap-900913/3/1/2.jpg";, "Created map has the right tile_uri");
+	is($map->get_tile_uri(1, 2, 3), 'http://tile.openaerialmap.org/tiles/1.0.0/openaerialmap-900913/3/1/2.jpg', "Created map has the right tile_uri");
 }
 
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]