rename map.save_map_string to map.save_map_to_string

This commit is contained in:
Dane Springmeyer 2009-12-06 22:33:47 +00:00
parent 561d937f2a
commit fe3ffe6c2d
5 changed files with 7 additions and 7 deletions

View file

@ -564,7 +564,7 @@ __all__ = [
# factory methods
'Filter',
# load/save/render
'load_map', 'load_map_from_string', 'save_map', 'save_map_string',
'load_map', 'load_map_from_string', 'save_map', 'save_map_to_string',
'render', 'render_tile_to_file', 'render_to_file',
# other
'register_plugins', 'register_fonts',

View file

@ -265,7 +265,7 @@ bool has_pycairo()
BOOST_PYTHON_FUNCTION_OVERLOADS(load_map_overloads, load_map, 2, 3);
BOOST_PYTHON_FUNCTION_OVERLOADS(load_map_string_overloads, load_map_string, 2, 4);
BOOST_PYTHON_FUNCTION_OVERLOADS(save_map_overloads, save_map, 2, 3);
BOOST_PYTHON_FUNCTION_OVERLOADS(save_map_string_overloads, save_map_string, 1, 2);
BOOST_PYTHON_FUNCTION_OVERLOADS(save_map_to_string_overloads, save_map_to_string, 1, 2);
BOOST_PYTHON_MODULE(_mapnik)
{
@ -275,7 +275,7 @@ BOOST_PYTHON_MODULE(_mapnik)
using mapnik::load_map;
using mapnik::load_map_string;
using mapnik::save_map;
using mapnik::save_map_string;
using mapnik::save_map_to_string;
register_exception_translator<mapnik::config_error>(translator);
register_cairo();
@ -467,7 +467,7 @@ BOOST_PYTHON_MODULE(_mapnik)
);
*/
def("save_map_string", & save_map_string, save_map_string_overloads());
def("save_map_to_string", & save_map_to_string, save_map_to_string_overloads());
def("mapnik_version", &mapnik_version,"Get the Mapnik version number");
def("mapnik_svn_revision", &mapnik_svn_revision,"Get the Mapnik svn revision");
def("has_cairo", &has_cairo, "Get cairo library status");

View file

@ -32,7 +32,7 @@ namespace mapnik
{
MAPNIK_DECL void save_map(Map const& map, std::string const& filename, bool explicit_defaults = false);
MAPNIK_DECL std::string save_map_string(Map const& map, bool explicit_defaults = false);
MAPNIK_DECL std::string save_map_to_string(Map const& map, bool explicit_defaults = false);
}

View file

@ -574,7 +574,7 @@ namespace mapnik
write_xml(filename,pt);
}
std::string save_map_string(Map const & map, bool explicit_defaults)
std::string save_map_to_string(Map const & map, bool explicit_defaults)
{
ptree pt;
serialize_map(pt,map,explicit_defaults);

View file

@ -27,7 +27,7 @@ def test():
mapnik.load_map(new_map, test_map)
eq_(open(test_map).read(),mapnik.save_map_string(new_map))
eq_(open(test_map).read(),mapnik.save_map_to_string(new_map))
if os.path.exists(test_map):
os.remove(test_map)