@@ -423,6 +423,7 @@ where
423423 let mut description: Option < String > = None ;
424424 let mut geometry: Option < Geometry < T > > = None ;
425425 let mut children: Vec < Element > = Vec :: new ( ) ;
426+ let mut style_url: Option < String > = None ;
426427
427428 loop {
428429 let e = self . reader . read_event_into ( & mut self . buf ) ?;
@@ -432,6 +433,7 @@ where
432433 match e. local_name ( ) . as_ref ( ) {
433434 b"name" => name = Some ( self . read_str ( ) ?) ,
434435 b"description" => description = Some ( self . read_str ( ) ?) ,
436+ b"styleUrl" => style_url = Some ( self . read_str ( ) ?) ,
435437 b"Point" => geometry = Some ( Geometry :: Point ( self . read_point ( attrs) ?) ) ,
436438 b"LineString" => {
437439 geometry = Some ( Geometry :: LineString ( self . read_line_string ( attrs) ?) )
@@ -462,6 +464,7 @@ where
462464 Ok ( Placemark {
463465 name,
464466 description,
467+ style_url,
465468 geometry,
466469 attrs,
467470 children,
@@ -1599,6 +1602,7 @@ mod tests {
15991602 <Placemark>
16001603 <name><![CDATA[Test & Test]]></name>
16011604 <description>1¼ miles</description>
1605+ <styleUrl>#foo</styleUrl>
16021606 <Point>
16031607 <coordinates>
16041608 -1.0,1.0,0
@@ -1614,6 +1618,7 @@ mod tests {
16141618 . unwrap ( ) ;
16151619 assert_eq ! ( placemark. name, Some ( "Test & Test" . to_string( ) ) ) ;
16161620 assert_eq ! ( placemark. description, Some ( "1¼ miles" . to_string( ) ) ) ;
1621+ assert_eq ! ( placemark. style_url, Some ( "#foo" . to_string( ) ) ) ;
16171622 }
16181623
16191624 #[ test]
0 commit comments