Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add <gx:SimpleArrayData> to SchemaData #414

Open
cleder opened this issue Jan 30, 2025 · 1 comment
Open

Add <gx:SimpleArrayData> to SchemaData #414

cleder opened this issue Jan 30, 2025 · 1 comment

Comments

@cleder
Copy link
Owner

cleder commented Jan 30, 2025

https://developers.google.com/kml/documentation/kmlreference#example-of-track-with-extended-data

    <Schema id="schema">
      <gx:SimpleArrayField name="heartrate" type="int">
        <displayName>Heart Rate</displayName>
      </gx:SimpleArrayField>
      <gx:SimpleArrayField name="cadence" type="int">
        <displayName>Cadence</displayName>
      </gx:SimpleArrayField>
      <gx:SimpleArrayField name="power" type="float">
        <displayName>Power</displayName>
      </gx:SimpleArrayField>
    </Schema>
            <SchemaData schemaUrl="#schema">
              <gx:SimpleArrayData name="cadence">
                <gx:value>86</gx:value>
                <gx:value>103</gx:value>
                <gx:value>108</gx:value>
                <gx:value>113</gx:value>
                <gx:value>113</gx:value>
                <gx:value>113</gx:value>
                <gx:value>113</gx:value>
              </gx:SimpleArrayData>
              <gx:SimpleArrayData name="heartrate">
                <gx:value>181</gx:value>
                <gx:value>177</gx:value>
                <gx:value>175</gx:value>
                <gx:value>173</gx:value>
                <gx:value>173</gx:value>
                <gx:value>173</gx:value>
                <gx:value>173</gx:value>
              </gx:SimpleArrayData>
              <gx:SimpleArrayData name="power">
                <gx:value>327.0</gx:value>
                <gx:value>177.0</gx:value>
                <gx:value>179.0</gx:value>
                <gx:value>162.0</gx:value>
                <gx:value>166.0</gx:value>
                <gx:value>177.0</gx:value>
                <gx:value>183.0</gx:value>
              </gx:SimpleArrayData>
            </SchemaData>
          </ExtendedData>

Schema:

  <element name="SimpleArrayField" type="gx:SimpleArrayFieldType"
    substitutionGroup="kml:SchemaExtension"/>

  <complexType name="SimpleArrayFieldType">
    <sequence>
      <element ref="kml:displayName" minOccurs="0"/>
      <element ref="gx:SimpleArrayFieldExtension" minOccurs="0"
        maxOccurs="unbounded"/>
    </sequence>
    <attribute name="type" type="string"/>
    <attribute name="name" type="string"/>
  </complexType>
  <element name="SimpleArrayFieldExtension" abstract="true"/>

  <element name="SimpleArrayData" type="gx:SimpleArrayDataType"
    substitutionGroup="kml:SchemaDataExtension"/>

  <complexType name="SimpleArrayDataType">
    <complexContent>
      <extension base="kml:AbstractObjectType">
        <sequence>
          <element ref="gx:value" minOccurs="0" maxOccurs="unbounded"/>
          <element ref="gx:SimpleArrayDataExtension" minOccurs="0"
            maxOccurs="unbounded"/>
        </sequence>
        <attribute name="name" type="string"/>
      </extension>
    </complexContent>
  </complexType>
@cleder cleder changed the title Add <gx:SimpleArrayData> Add <gx:SimpleArrayData> to SchemaData Jan 30, 2025
@cleder
Copy link
Owner Author

cleder commented Jan 30, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant