Show "all possible" extended data fields in balloon

701 views Asked by At

Background: Alright so I am working on an application that uses SharpKML to produce a number of Placemarks that each have properties associated with it. I want to show these properties as custom data elements within the popup balloon.

Problem: I cannot seem to be able to set my balloon style to show all of the extended data elements in a table regardless of how many there are or their name.

Please if you can help with this.

Cheers.

Edit: Added the KML code that is produced.

<Style id="cim-default-conductors">
  <LabelStyle>
    <color>ff7814b4</color>
    <colorMode>normal</colorMode>
    <scale>1</scale>
  </LabelStyle>
  <LineStyle>
    <color>ff7814b4</color>
    <colorMode>normal</colorMode>
    <width>3</width>
  </LineStyle>
  <BalloonStyle>
    <bgColor>ffffffff</bgColor>
    <textColor>ff000000</textColor>
    <text><![CDATA[<b>$[name]</b><br/>Conductor Spacing: $[amst:phase_spacing_summary]<br/>Description: $[description]<br/>]]></text>
    <displayMode>default</displayMode>
  </BalloonStyle>
</Style>

================Different kml doc=======================

  <Placemark>
    <name>CIM_ACLineSegment Name: 17470033 mRID: _111192568740L1</name>
    <description>cim:ACLineSegment</description>
    <styleUrl>../master.kml#cim-default-conductors</styleUrl> <--references the produced style that is shown above. 
    <ExtendedData>
      <Data name="mRID">
        <value>111192568740L1</value>
      </Data>
      <Data name="name">
        <value>17470033</value>
      </Data>
      <Data name="length">
        <value>30</value>
      </Data>
      <Data name="ratedVoltage">
        <value>600</value>
      </Data>
      <Data name="conductorMaterial">
        <value>other</value>
      </Data>
    </ExtendedData>
    <LineString>
      <altitudeMode>relativeToGround</altitudeMode>
      <coordinates>126.795933456158,-45.6023587778821,0</coordinates>
    </LineString>
  </Placemark>
0

There are 0 answers