source: trunk/t/28_wgs84_coords.t @ 730

Last change on this file since 730 was 730, checked in by Dominic Hargreaves, 16 years ago

Add initial google maps support, see #46 but this isn't yet a complete
implementation so leaving the bug open for now.

  • Property svn:executable set to *
File size: 849 bytes
RevLine 
[730]1use strict;
2use CGI::Wiki::Setup::SQLite;
3use OpenGuides;
4use OpenGuides::Test;
5use Test::More;
6
7plan tests => 2;
8
9# Clear out the database from any previous runs.
10unlink "t/node.db";
11
12my $config = OpenGuides::Test->make_basic_config;
13$config->force_wgs84 (1);
14
15my $guide = OpenGuides->new( config => $config );
16
17my ($longitude, $latitude) = (0, 0);
18
19my ($wgs_long, $wgs_lat) = OpenGuides::Utils->get_wgs84_coords(
20                                                    longitude => $longitude,
21                                                    latitude => $latitude,
22                                                    config => $config);
23
24is( $wgs_long, $longitude,
25    "get_wgs84_coords returns the original longitude when force_wgs84 is on");
26is( $wgs_lat, $latitude,
27    "get_wgs84_coords returns the original latitude when force_wgs84 is on");
Note: See TracBrowser for help on using the repository browser.