none
Handling KML [CDATA] RRS feed

  • Question

  • I have a KML file that displays fine in Google Earth. When I pull this into Bingmaps with GeoXML I can see the points icons and lines fine. It will not read the [CDATA] from the Placemark ID. Do I need to format this different to get it to work or am I out of luck?

        <Placemark id="Storm Location">
             <name>1016 Ring St, Sun Prairie, WI 10/07/2017 5:12pm</name>
              <styleUrl>#pushpin1</styleUrl>
             <description> 
                  <![CDATA[<p><font color="red"><i>Issued:..............</i></font> 10/07/2017 17:12:11
      
                 <br /><font color="red"><i>Expires:..............</i></font> 07 Oct 2017 22:45
                 <br /><font color="red"><i>Counties:...........</i></font> Dane, Rock, Walworth                  
    
    </p>]]> 
            </description>  

    Thursday, November 2, 2017 9:56 AM

Answers

  • Just tested the KML you provided and it read the CData and renders it correctly. Here is the KML I used to test with:

    <?xml version='1.0' standalone='yes' encoding='UTF-8'?>
    <kml xmlns='http://www.opengis.net/kml/2.2' xmlns:atom='http://www.w3.org/2000/xmlns/'>
        <Document>
     <Placemark id="Storm Location">
             <name>1016 Ring St, Sun Prairie, WI 10/07/2017 5:12pm</name>
             
             <description> 
                  <![CDATA[<p><font color="red"><i>Issued:..............</i></font> 10/07/2017 17:12:11
      
                 <br /><font color="red"><i>Expires:..............</i></font> 07 Oct 2017 22:45
                 <br /><font color="red"><i>Counties:...........</i></font> Dane, Rock, Walworth                  
    
    </p>]]> 
            </description>  
    <Point>
          <coordinates>-122.0822035425683,37.42228990140251,0</coordinates>
        </Point>
    </Placemark>
        </Document>
    </kml>

    And here is a screen shot:

    You can try copy/pasting the KML into this sample: http://bingmapsv8samples.azurewebsites.net/#GeoXml%20-%20Drag%20and%20Drop in the XML Panel and then press the Read XML button.


    [Blog] [twitter] [LinkedIn]



    Friday, November 10, 2017 2:13 AM

All replies

  • Don't see any issues with your kml. Will test this when back in the office next week.

    [Blog] [twitter] [LinkedIn]

    Thursday, November 2, 2017 5:24 PM
  • Just tested the KML you provided and it read the CData and renders it correctly. Here is the KML I used to test with:

    <?xml version='1.0' standalone='yes' encoding='UTF-8'?>
    <kml xmlns='http://www.opengis.net/kml/2.2' xmlns:atom='http://www.w3.org/2000/xmlns/'>
        <Document>
     <Placemark id="Storm Location">
             <name>1016 Ring St, Sun Prairie, WI 10/07/2017 5:12pm</name>
             
             <description> 
                  <![CDATA[<p><font color="red"><i>Issued:..............</i></font> 10/07/2017 17:12:11
      
                 <br /><font color="red"><i>Expires:..............</i></font> 07 Oct 2017 22:45
                 <br /><font color="red"><i>Counties:...........</i></font> Dane, Rock, Walworth                  
    
    </p>]]> 
            </description>  
    <Point>
          <coordinates>-122.0822035425683,37.42228990140251,0</coordinates>
        </Point>
    </Placemark>
        </Document>
    </kml>

    And here is a screen shot:

    You can try copy/pasting the KML into this sample: http://bingmapsv8samples.azurewebsites.net/#GeoXml%20-%20Drag%20and%20Drop in the XML Panel and then press the Read XML button.


    [Blog] [twitter] [LinkedIn]



    Friday, November 10, 2017 2:13 AM
  • Hello Ricky. Been fighting other fires for a while. Will send you some code tomorrow. Above works but I believe it is the exclusion of a fly thru that breaks it.... I will keep adding in code and see where that point is. 
    Tuesday, November 21, 2017 12:19 AM