Skip Menu |

This queue is for tickets about the Geo-GoogleEarth-Pluggable CPAN distribution.

Report information
The Basics
Id: 103043
Status: rejected
Worked: 20 min
Priority: 0/
Queue: Geo-GoogleEarth-Pluggable

People
Owner: Nobody in particular
Requestors: jidanni [...] jidanni.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: no way to turn off "<Snippet maxLines="0"/>"
Date: Tue, 24 Mar 2015 07:32:34 +0800
To: bug-Geo-GoogleEarth-Pluggable [...] rt.cpan.org
From: 積丹尼 Dan Jacobson <jidanni [...] jidanni.org>
There is no way to turn off printing at least a <Snippet maxLines="0"/> when rendering. Package: libgeo-googleearth-pluggable-perl Version: 0.15-2
On Mon Mar 23 19:32:48 2015, jidanni@jidanni.org wrote: Show quoted text
> There is no way to turn off printing at least a > <Snippet maxLines="0"/> > when rendering. > > Package: libgeo-googleearth-pluggable-perl > Version: 0.15-2
I feel this is consistent with the documentation. Please provide patch of how you think the requirement should be implemented. $ perl -e ' use Geo::GoogleEarth::Pluggable; my $document = Geo::GoogleEarth::Pluggable->new(Snippet=>"line 1"); print $document->render; ' <?xml version="1.0" encoding="utf-8"?> <kml xmlns="http://www.opengis.net/kml/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:atom="http://www.w3.org/2005/Atom"><Document><Snippet maxLines="1">line 1</Snippet></Document></kml> Code in question lib/Geo/GoogleEarth/Pluggable/Folder.pm push @data, E(Snippet=>{maxLines=>scalar(@{$self->Snippet})}, join("\n", @{$self->Snippet})); /lib/Geo/GoogleEarth/Pluggable/Base.pm Returns the Snippet used in the Snippet XML element or a Placemark. The default Snippet from Google Earth is to use the first line of the description however this package defaults to a zero line Snippet. Snippet is rendered with maxLines as the length of the array ref and the content joined with new lines. Typical use $document->Point(Snippet=>"Line 1"); $document->Point(Snippet=>["Line 1", "Line 2"]); Extended used my $snippet=$placemark->Snippet; #[] always array reference $placemark->Snippet([]); #default $placemark->Snippet(["line 1", "line 2", "line 3"]); $placemark->Snippet("My Snippet Text"); #folded into array reference. $placemark->Snippet("line 1", "line 2", "line 3"); #folded into array reference Thanks, Mike
Subject: Re: [rt.cpan.org #103043] no way to turn off "<Snippet maxLines="0"/>"
Date: Tue, 24 Mar 2015 10:46:48 +0800
To: "Michael R. Davis via RT" <bug-Geo-GoogleEarth-Pluggable [...] rt.cpan.org>
From: 積丹尼 Dan Jacobson <jidanni [...] jidanni.org>
All I know is snippet is optional and the KML is still valid without it, so there should still be a way to get rid of it without using "|sed /Snippet/d" for those who wish their KML to have less lines, for better or worse.
Subject: Re: [rt.cpan.org #103043] no way to turn off "<Snippet maxLines="0"/>"
Date: Tue, 24 Mar 2015 12:13:13 +0800
To: "Michael R. Davis via RT" <bug-Geo-GoogleEarth-Pluggable [...] rt.cpan.org>
From: 積丹尼 Dan Jacobson <jidanni [...] jidanni.org>
By the way I read snippet is better than Snippet, http://service.kmlvalidator.com/ets/ogc-kml/2.2/#Snippet ATC 76: Snippet Identifier http://www.opengis.net/kml/2.2/atc/level-3/Snippet Test purpose Check for any occurrences of the (deprecated) kml:Snippet element. Test method Pass if no kml:Snippet elements occur; fail otherwise. This element is deprecated in favour of kml:snippet. Reference OGC-07-147r2: Annex A Test type Basic