Changeset 1677 in josm for trunk/src/org/openstreetmap/josm/io/GpxWriter.java
- Timestamp:
- 17.06.2009 10:04:22 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/GpxWriter.java
r1612 r1677 46 46 out.println("<?xml version='1.0' encoding='UTF-8'?>"); 47 47 out.println("<gpx version=\"1.1\" creator=\"JOSM GPX export\" xmlns=\"http://www.topografix.com/GPX/1/1\"\n" + 48 " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \n" +49 " xsi:schemaLocation=\"http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd\">");48 " xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \n" + 49 " xsi:schemaLocation=\"http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd\">"); 50 50 indent = " "; 51 51 writeMetaData(); … … 60 60 // FIXME this loop is evil, because it does not assure the 61 61 // correct element order specified by the xml schema. 62 // for now it works, but future extension could get very complex and unmaintainable 62 // for now it works, but future extension could get very complex and unmaintainable 63 63 for (Map.Entry<String, Object> ent : attr.entrySet()) { 64 64 String k = ent.getKey(); … … 76 76 Map<String, Object> attr = data.attr; 77 77 openln("metadata"); 78 78 79 79 // write the description 80 80 if (attr.containsKey(GpxData.META_DESC)) simpleTag("desc", (String)attr.get(GpxData.META_DESC)); 81 81 82 82 // write the author details 83 if (attr.containsKey(GpxData.META_AUTHOR_NAME) 83 if (attr.containsKey(GpxData.META_AUTHOR_NAME) 84 84 || attr.containsKey(GpxData.META_AUTHOR_EMAIL)) { 85 85 openln("author"); … … 99 99 100 100 // write the copyright details 101 if(attr.containsKey(GpxData.META_COPYRIGHT_LICENSE) 101 if(attr.containsKey(GpxData.META_COPYRIGHT_LICENSE) 102 102 || attr.containsKey(GpxData.META_COPYRIGHT_YEAR)) { 103 103 openAtt("copyright", "author=\""+ attr.get(GpxData.META_COPYRIGHT_AUTHOR) +"\""); … … 110 110 closeln("copyright"); 111 111 } 112 112 113 113 // write links 114 114 if(attr.containsKey(GpxData.META_LINKS)) { … … 117 117 } 118 118 } 119 120 // write keywords 119 120 // write keywords 121 121 if (attr.containsKey(GpxData.META_KEYWORDS)) simpleTag("keywords", (String)attr.get(GpxData.META_KEYWORDS)); 122 122
Note: See TracChangeset
for help on using the changeset viewer.
