Forum Discussion
Multiple error generation when using geojson as a reference layer in Azure Maps
- 1 year ago
FYI the root cause of the problem is that some of the "features" (ie. map regions) in my GeoJSON file had "geometry":null - meaning that they were regions that should not be drawn. While most mapping software can handle this problem, Azure Maps reference layers cannot.
If you find yourself with this problem, you will need to delete any features in your GeoJSON file with the "geometry":null tag (see example below). The Power BI devs have told me that they expect a fix to be shipped in a couple of months (but no promises)
Hi rileywells - Simplifying the GeoJSON file might help, but it's possible the file is still too large or complex. When simplifying, you might want to reduce it even further (to less than 1%) to ensure it works smoothly in Power BI. Sometimes complex shapes or large files can cause rendering issues in Azure Maps.GeoJSON Format: Ensure the GeoJSON format is valid. Since the boundaries load initially but fail when interacted with, the GeoJSON file may have some errors or unsupported features. Double-check the file for any unnecessary properties or geometries that Power BI might struggle to handle. You can validate the GeoJSON using tools likeGeoJSON Viewer & Validator (geojsonlint.com)
It's worth noting that the Azure Maps visual is relatively new and may have some limitations, especially when dealing with custom GeoJSON layers. Ensure that Power BI and Azure Maps are fully updated to the latest versions to avoid bugs that might have been fixed in later patches.