ToastFreeware
/
philipp
/
winterrodeln
/
wrpylib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Renamed RodelbahnboxValidator to RodelbahnboxDictValidator.
[philipp/winterrodeln/wrpylib.git]
/
wrpylib
/
wrmwmarkup.py
diff --git
a/wrpylib/wrmwmarkup.py
b/wrpylib/wrmwmarkup.py
index bcd230f5eac640642fc7d090abd43e30215d13a0..bebca6d236aa7d39bd00e7a5b12da217440331f3 100644
(file)
--- a/
wrpylib/wrmwmarkup.py
+++ b/
wrpylib/wrmwmarkup.py
@@
-10,7
+10,7
@@
import formencode
import wrpylib.wrvalidators
import wrpylib.mwmarkup
import wrpylib.wrvalidators
import wrpylib.mwmarkup
-WRMAP_POINT_TYPES = ['gasthaus', 'haltestelle', 'parkplatz', 'achtung', 'punkt']
+WRMAP_POINT_TYPES = ['gasthaus', 'haltestelle', 'parkplatz', 'achtung', '
foto', 'verleih', '
punkt']
WRMAP_LINE_TYPES = ['rodelbahn', 'gehweg', 'alternative', 'lift', 'anfahrt', 'linie']
WRMAP_LINE_TYPES = ['rodelbahn', 'gehweg', 'alternative', 'lift', 'anfahrt', 'linie']
@@
-498,7
+498,10
@@
def create_wrmap(geojson):
wrmap_xml = xml.etree.ElementTree.Element('wrmap')
wrmap_xml.text = '\n\n'
for k, v in geojson['properties'].iteritems():
wrmap_xml = xml.etree.ElementTree.Element('wrmap')
wrmap_xml.text = '\n\n'
for k, v in geojson['properties'].iteritems():
- wrmap_xml.attrib[k] = str(v)
+ if k in ['lon', 'lat']:
+ wrmap_xml.attrib[k] = '{:.6f}'.format(v)
+ else:
+ wrmap_xml.attrib[k] = str(v)
assert geojson['type'] == 'FeatureCollection'
json_features = geojson['features']
assert geojson['type'] == 'FeatureCollection'
json_features = geojson['features']