# Create the map stuff
my $map = Champlain::View->new();
+ $map->set_size($stage->get_size);
$map->center_on(0, 0);
$map->set_scroll_mode('kinetic');
$map->set_zoom_level(3);
-
+ $stage->add($map);
+
my $layer = Champlain::Layer->new();
$map->add_layer($layer);
my $soup = My::Soup->new($capitals_url);
my $data = {
- map => $map,
- layer => $layer,
+ map => $map,
+ layer => $layer,
markers => [],
};
$map->set_scroll_mode('kinetic');
$map->set_zoom_level(5);
$map->set_size(640, 480);
+ $stage->add($map);
# Create the markers and marker layer
my $layer = Champlain::Layer->new();
# Create the map view
my $map = Champlain::View->new();
+ $map->set_size($stage->get_size);
$map->center_on(47.130885, -70.764141);
$map->set_scroll_mode('kinetic');
$map->set_zoom_level(5);
+ $stage->add($map);
# Create the markers and marker layer
my $layer = create_marker_layer($map);
# Create the map view
my $map = Champlain::View->new();
$map->set_scroll_mode('kinetic');
- $map->set_size(800, 600);
+ $map->set_size($stage->get_size);
$stage->add($map);
# Create the zoom buttons