Does ArcGIS Earth support attribute data (kml:Schema, kml:SchemaData tags)

320
1
Jump to solution
09-20-2023 12:19 PM
BillSmith
New Contributor III

Hello,

We are exporting kml/kmz to be read in ArcGIS Earth.  This same kml worked for Google Earth, so my question is, "Does AE support the Schema and schemaData tags?

When we click on a feature we receive the message. "This is an invalid xsi:type 'kmlSchema'".

<.............snip..................>

<kml:Schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="kmlSchema" name="" id="data_schema">
<kml:SimpleField type="string" name="storage_s">
<kml:displayName>storage_s</kml:displayName>
</kml:SimpleField>
<kml:SimpleField type="string" name="type">
<kml:displayName>type</kml:displayName>
</kml:SimpleField>

.....

</kml:Schema>

.......

<kml:ExtendedData>
<kml:SchemaData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="kmlSchemaData" schemaUrl="#data_schema">
<kml:SimpleData name="storage_s">PRIMARY</kml:SimpleData>
<kml:SimpleData name="type">document</kml:SimpleData>

<..................snip................>

Thanks,

-Bill

0 Kudos
1 Solution

Accepted Solutions
XuewenZhang
Esri Contributor

Hi Bill,

Thanks for your feedback and those snippets.

Here is a quick answer: Yes, ArcGIS Earth does support the Schema and SchemaData tags. There are some examples from https://developers.google.com/kml/documentation/extendeddata#declare-the-schema-element that you could use to have a try.

However, ArcGIS Earth does not support loading a KML/KMZ with a custom namespace or custom prefix declared at the start of the document and used throughout. This is why your data cannot be loaded to ArcGIS Earth. The support of custom namespaces is in our product backlog but it will need an additional load to fix. I'll keep you posted when it's ready.

As a workaround, you could remove the custom namespace to make the data loaded in ArcGIS Earth. I have tried to remove those custom namespaces based on your snippets and KML can be loaded well into ArcGIS Earth.

<Schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="kmlSchema" name="user_name" id="data_schema">
  <SimpleField type="string" name="storage_s">
    <displayName>storage_s</displayName>
  </SimpleField>
  <SimpleField type="string" name="type">
    <displayName>type</displayName>
  </SimpleField>
</Schema>

......

<ExtendedData>
  <SchemaData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="kmlSchemaData" schemaUrl="#data_schema">
    <SimpleData name="storage_s">PRIMARY</SimpleData>
    <SimpleData name="type">document</SimpleData>
  </SchemaData>
</ExtendedData>

XuewenZhang_0-1695275465725.png

 

Thanks,

Xuewen

View solution in original post

1 Reply
XuewenZhang
Esri Contributor

Hi Bill,

Thanks for your feedback and those snippets.

Here is a quick answer: Yes, ArcGIS Earth does support the Schema and SchemaData tags. There are some examples from https://developers.google.com/kml/documentation/extendeddata#declare-the-schema-element that you could use to have a try.

However, ArcGIS Earth does not support loading a KML/KMZ with a custom namespace or custom prefix declared at the start of the document and used throughout. This is why your data cannot be loaded to ArcGIS Earth. The support of custom namespaces is in our product backlog but it will need an additional load to fix. I'll keep you posted when it's ready.

As a workaround, you could remove the custom namespace to make the data loaded in ArcGIS Earth. I have tried to remove those custom namespaces based on your snippets and KML can be loaded well into ArcGIS Earth.

<Schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="kmlSchema" name="user_name" id="data_schema">
  <SimpleField type="string" name="storage_s">
    <displayName>storage_s</displayName>
  </SimpleField>
  <SimpleField type="string" name="type">
    <displayName>type</displayName>
  </SimpleField>
</Schema>

......

<ExtendedData>
  <SchemaData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="kmlSchemaData" schemaUrl="#data_schema">
    <SimpleData name="storage_s">PRIMARY</SimpleData>
    <SimpleData name="type">document</SimpleData>
  </SchemaData>
</ExtendedData>

XuewenZhang_0-1695275465725.png

 

Thanks,

Xuewen