Forum Discussion
Issue with KML display on Azure Maps
Hi,
Our company is looking to utilise the Atlas Spatial IO Module as part of Azure Maps in order to allow users to upload their own KML/KMZ files and view them through our platform. However, we have a few issues which I was hoping that you could please assist with:
1. Certain KML/KMZ files which are generated from the Google Earth Desktop version are unable to be properly loaded by the Spatial IO Module. I've attached a copy of a KMZ (crash.kmz.zip - I had to rename it to .zip to upload the file) which exhibits this behavior. Attempting to load it onto the sample shown https://azuremapscodesamples.azurewebsites.net/Spatial%20IO%20Module/Drag%20and%20drop%20spatial%20files%20onto%20map.html results in an infinite loading sequence along with the following message being thrown in the console:
DataCloneError: The object could not be cloned.
We believe this is being caused by the empty <Icon> XML tags which are automatically generated by Google Earth.
2. We are also unable to properly load external icons which come from Google Earth despite adding in the correct CSP policies in our application. The default fallback icon is used instead. I've attached a copy of a KML file which is unable to load the icons; the same file in Leaflet correctly displays the icons used as shown in the images below. I also attached a copy of this KML file below (2007SanDiegoCountyFiresZipped.zip). In addition, logging the output of the read() function in the Spatial IO Module for the file has the icons property as empty.
If you could please provide some assistance that would be much appreciated.
Thanks!