Bug in Spatial IO Module KMZ reader

Llewellyn Roos 0 Reputation points
2024-10-08T07:56:17.7966667+00:00

There is an issue loading icon style from KMZ in the azure-maps-spatial-io package method atlas.io.read(string, options) when the Icon href refers to a local resource in the KMZ zip stream instead of an absolute path. E.g. open the file AL142024_004adv_TRACK.kmz, contains the files:

  1. al142024_004adv_TRACK.kml
  2. dPoint.png

The KML contains Style element with IconStyle definition:

<Icon>
    <href>dPoint.png</href>
</Icon> 

Observing the network tab, the library does generate a fetch of each embedded resource as a data uri i.e. data:image/png;base64,... but in the result SpatialDataSet.icons object is empty. It appears the support is already implemented but there is a bug in returning the result.

Reproducible on samples page https://samples.azuremaps.com/spatial-io-module/drag-and-drop-spatial-files-onto-map by dragging the KMZ file onto the map and observing that point features are not styled with the icon symbol. 

What is the process to submit such bug reports? This is a closed source library, else I would be happy to try submit the PR to resolve. I've posted the same bug here https://feedback.azure.com/d365community/idea/8be8c1f5-4985-ef11-9443-6045bdb6b57c

Azure Maps
Azure Maps
An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
831 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. rbrundritt 20,836 Reputation points Microsoft Employee Moderator
    2024-10-08T16:37:24.02+00:00

    This is a very odd one as it works for most of the KMZ files I've tried, but not all. I tried debugging via the browser, but the KMZ reader logic is embedded in a bundled web worker with async/awaits mangled up, so hard to follow the code, that said I believe this issue is in the logic that preloads the embedded images. I'll reach out to the Azure Maps team and let them know how to reproduce this issue so they can investigate.

    In regard to filling bugs/reporting issues, the two main ways to do this are;

    • On these forums
    • Create a support ticket in the Azure portal
    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.