sub get_osm_mapnik {
- my $factory = Champlain::MapSourceFactory->get_default();
+ my $factory = Champlain::MapSourceFactory->dup_default();
return $factory->create(MAP_OSM_MAPNIK);
}
sub get_osm_cycle_map {
- my $factory = Champlain::MapSourceFactory->get_default();
+ my $factory = Champlain::MapSourceFactory->dup_default();
return $factory->create(MAP_OSM_CYCLE_MAP);
}
sub get_osm_osmarender {
- my $factory = Champlain::MapSourceFactory->get_default();
+ my $factory = Champlain::MapSourceFactory->dup_default();
return $factory->create(MAP_OSM_OSMARENDER);
}
sub get_oam {
- my $factory = Champlain::MapSourceFactory->get_default();
+ my $factory = Champlain::MapSourceFactory->dup_default();
return $factory->create(MAP_OAM);
}
sub get_mff_relief {
- my $factory = Champlain::MapSourceFactory->get_default();
+ my $factory = Champlain::MapSourceFactory->dup_default();
return $factory->create(MAP_MFF_RELIEF);
}
# Change the map source (get a different map source)
- my $factory = Champlain::MapSourceFactory->get_default();
+ my $factory = Champlain::MapSourceFactory->dup_default();
my $source_new = $factory->create(Champlain::MapSourceFactory->OSM_MAPNIK);
if ($source_original->get_id eq $source_new->get_id) {
# Same kind of map source, take another one