]> ToastFreeware Gitweb - philipp/winterrodeln/wrpylib.git/commitdiff
Avoid that deleting "type" modifies the original json when creating a map.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Fri, 20 May 2022 16:22:51 +0000 (18:22 +0200)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Fri, 20 May 2022 16:22:51 +0000 (18:22 +0200)
wrpylib/wrmwmarkup.py

index 91d876ddacd9f54cfd2ecdc517ac47a0d51de59c..7ac2c98a3efe4b9ae0786571bc98f09d07d413ac 100644 (file)
@@ -340,7 +340,7 @@ def create_wrmap(geojson: Dict) -> str:
                 last_json_feature.tail = '\n\n'
             feature_xml.text = '\n' + create_wrmap_coordinates(geo['coordinates']) + '\n'
         last_json_feature = feature_xml
-        feature_xml.attrib = json_feature['properties']
+        feature_xml.attrib = json_feature['properties'].copy()
         del feature_xml.attrib['type']
 
     if last_json_feature is not None: