javaapiforkml icon indicating copy to clipboard operation
javaapiforkml copied to clipboard

Modified primitive double data type to Double wrapper in Icon and Link.

Open SriramMLN opened this issue 9 years ago • 2 comments

The KML generated by JAK was failing ogckml22.xsd schema validation due to presence of refreshInterval, viewRefreshTime and viewBoundScale with value as 0.0 in Icon and Link element and this was due to these variables were declared as primitive double. The issue is fixed after the variable declaration was modified to Double wrapper. Please validate.

KML fragment:for Icon

KML Fragment for NetworkLink in Link: <NetworkLink> Network Link Get a new KML <Link> http://gmaps-samples.googlecode.com/svn/trunk/ggeoxml/cta.kml <refreshInterval>0.0</refreshInterval> <viewRefreshTime>0.0</viewRefreshTime> <viewBoundScale>0.0</viewBoundScale> </Link> </NetworkLink>

SriramMLN avatar Apr 29 '15 16:04 SriramMLN

Seems legit. Based on http://schemas.opengis.net/kml/2.2.0/ogckml22.xsd the Link class is also affected. Url is not defined in javaapiforkml it seems.

These three extends LinkType:

<element name="Icon" type="kml:LinkType" substitutionGroup="kml:AbstractObjectGroup"/>
<element name="Link" type="kml:LinkType" substitutionGroup="kml:AbstractObjectGroup"/>
<element name="Url" type="kml:LinkType" substitutionGroup="kml:AbstractObjectGroup">

And LinkType is defined as:

<complexType name="LinkType" final="#all">
<complexContent>
<extension base="kml:BasicLinkType">
<sequence>
<element ref="kml:refreshMode" minOccurs="0"/>
<element ref="kml:refreshInterval" minOccurs="0"/>
<element ref="kml:viewRefreshMode" minOccurs="0"/>
<element ref="kml:viewRefreshTime" minOccurs="0"/>
<element ref="kml:viewBoundScale" minOccurs="0"/>
<element ref="kml:viewFormat" minOccurs="0"/>
<element ref="kml:httpQuery" minOccurs="0"/>
<element ref="kml:LinkSimpleExtensionGroup" minOccurs="0" maxOccurs="unbounded"/>
<element ref="kml:LinkObjectExtensionGroup" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</extension>
</complexContent>
</complexType>

minOccurs="0 -> required=false: http://stackoverflow.com/questions/13801401/xml-schema-type-that-generates-java-primitive-type-using-jaxb-doesnt-add-requir

hestad avatar Dec 20 '15 10:12 hestad

Sorry, this project is not actively maintained :pensive:

See #18 for further information.

mischah avatar Feb 21 '16 13:02 mischah