[libchamplain/libchamplain-0-4] Perl bindings for champlain_map_source_get_meters_per_pixel
- From: Pierre-Luc Beaudoin <plbeaudoin src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [libchamplain/libchamplain-0-4] Perl bindings for champlain_map_source_get_meters_per_pixel
- Date: Sat, 9 Jan 2010 19:57:06 +0000 (UTC)
commit 6a910e50890316ad5816da1925e91ea2a1a2e53c
Author: Emmanuel Rodriguez <emmanuel rodriguez gmail com>
Date: Fri Jan 8 22:07:48 2010 +0100
Perl bindings for champlain_map_source_get_meters_per_pixel
bindings/perl/Champlain/t/ChamplainMapSource.t | 13 +++++++++++--
bindings/perl/Champlain/xs/ChamplainMapSource.xs | 8 ++++++++
2 files changed, 19 insertions(+), 2 deletions(-)
---
diff --git a/bindings/perl/Champlain/t/ChamplainMapSource.t b/bindings/perl/Champlain/t/ChamplainMapSource.t
index 336deef..0036b7c 100644
--- a/bindings/perl/Champlain/t/ChamplainMapSource.t
+++ b/bindings/perl/Champlain/t/ChamplainMapSource.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use Clutter::TestHelper tests => 165;
+use Clutter::TestHelper tests => 166;
use Champlain qw(:coords :maps);
@@ -13,11 +13,18 @@ my $OSM_URL_LICENSE = 'http://creativecommons.org/licenses/by-sa/2.0/';
exit tests();
sub tests {
- test_osm_mapnik();
+ my $map = test_osm_mapnik();
test_osm_cyclemap();
test_osm_osmarender();
test_oam();
test_mff_relief();
+
+ SKIP: {
+ Champlain->CHECK_VERSION(0, 4, 3) or skip '0.4.3 stuff', 1;
+ my $meters = $map->get_meters_per_pixel($map->get_min_zoom_level, 0, 0);
+ ok($meters > 0, "Meters per pixel $meters");
+ }
+
return 0;
}
@@ -39,6 +46,8 @@ sub test_osm_mapnik {
# Generic map operations
generic_map_operations($label, $map);
+
+ return $map;
}
diff --git a/bindings/perl/Champlain/xs/ChamplainMapSource.xs b/bindings/perl/Champlain/xs/ChamplainMapSource.xs
index 4c29dc4..611d969 100644
--- a/bindings/perl/Champlain/xs/ChamplainMapSource.xs
+++ b/bindings/perl/Champlain/xs/ChamplainMapSource.xs
@@ -82,3 +82,11 @@ champlain_map_source_get_license_uri (ChamplainMapSource *map_source)
void
champlain_map_source_fill_tile (ChamplainMapSource *map_source, ChamplainTile *tile)
+
+
+#if CHAMPLAIN_CHECK_VERSION (0, 4, 3)
+
+gfloat
+champlain_map_source_get_meters_per_pixel (ChamplainMapSource *map_source, gint zoom_level, gdouble latitude, gdouble longitude)
+
+#endif /* 0.4.3 */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]