Converted numeric attributes to strings in create_wrmap to avoid XML serialization...
authorphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Sun, 18 Aug 2013 20:46:56 +0000 (20:46 +0000)
committerphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Sun, 18 Aug 2013 20:46:56 +0000 (20:46 +0000)
git-svn-id: http://www.winterrodeln.org/svn/wrpylib/trunk@1523 7aebc617-e5e2-0310-91dc-80fb5f6d2477

wrpylib/wrmwmarkup.py

index 371f904832779f7e2eed3c91c4d0f919e0298b38..c9aba4ffa40c5de9957f9ed053fe85dbfe7dbbba 100644 (file)
@@ -504,7 +504,8 @@ def create_wrmap_coordinates(coords):
 def create_wrmap(attributes, geojson):
     """Creates a <wrmap> wikitext from geojson (as python types)."""
     wrmap_xml = xml.etree.ElementTree.Element('wrmap')
-    wrmap_xml.attrib = attributes
+    for k, v in attributes.iteritems():
+        wrmap_xml.attrib[k] = str(v)
 
     assert geojson['type'] == 'FeatureCollection'
     json_features = geojson['features']