|
73 | 73 | XML.tag(o::KMLElement) = name(o) |
74 | 74 |
|
75 | 75 | function XML.attributes(o::T) where {names, T <: KMLElement{names}} |
76 | | - Dict(k => getfield(o, k) for k in names if !isnothing(getfield(o, k))) |
| 76 | + OrderedDict(k => getfield(o, k) for k in names if !isnothing(getfield(o, k))) |
77 | 77 | end |
78 | 78 |
|
79 | 79 | XML.children(o::KMLElement) = XML.children(Node(o)) |
|
139 | 139 |
|
140 | 140 | function Node(o::KMLFile) |
141 | 141 | children = [ |
142 | | - Node(XML.Declaration, nothing, Dict("version" => "1.0", "encoding" => "UTF-8")), |
143 | | - Node(XML.Element, "kml", Dict("xmlns" => "http://earth.google.com/kml/2.2"), nothing, Node.(o.children)) |
| 142 | + Node(XML.Declaration, nothing, OrderedDict("version" => "1.0", "encoding" => "UTF-8")), |
| 143 | + Node(XML.Element, "kml", OrderedDict("xmlns" => "http://earth.google.com/kml/2.2"), nothing, Node.(o.children)) |
144 | 144 | ] |
145 | 145 | Node(XML.Document, nothing, nothing, nothing, children) |
146 | 146 | end |
@@ -335,7 +335,7 @@ Base.@kwdef mutable struct Placemark <: Feature |
335 | 335 | end |
336 | 336 | GeoInterface.isfeature(o::Type{Placemark}) = true |
337 | 337 | GeoInterface.trait(o::Placemark) = GeoInterface.FeatureTrait() |
338 | | -GeoInterface.properties(o::Placemark) = NamedTuple(Dict(f => getfield(o,f) for f in setdiff(fieldnames(Placemark), [:Geometry]))) |
| 338 | +GeoInterface.properties(o::Placemark) = NamedTuple(OrderedDict(f => getfield(o,f) for f in setdiff(fieldnames(Placemark), [:Geometry]))) |
339 | 339 | GeoInterface.geometry(o::Placemark) = o.Geometry |
340 | 340 |
|
341 | 341 |
|
|
0 commit comments