Forum Discussion
Azure Maps – Dynamic zoom when filtering polygons from a single GeoJSON?
- 9 months ago
Hello Anonymous,
This behaviour is expected because the Azure Maps visual calculates the zoom level based on the full extent of the GeoJSON file, even when the data is filtered in Power BI. Unfortunately, there is currently no native option to automatically recalculate the extent only for the visible data after filtering.Recommended Approaches
1. Split the GeoJSON into multiple files (recommended)
Instead of using a single GeoJSON containing all areas, create a table with a column that holds the specific GeoJSON for each area. When the user selects an area in the slicer, the visual will load only the corresponding file, automatically adjusting the zoom.This can be achieved in Power Query:- Import the GeoJSON.
- Expand the polygons and create a column with the individual JSON for each area.
- Link this table to the slicer.
f this answer was helpful in any way, I would be pleased to receive a thumbs-up, as well as the satisfaction of seeing a DAX measure work for the first time without needing yet another FILTER.
Please mark it as the accepted solution. This helps other community members find the quickest path and saves them from another endless loop 🌀.
Hi Anonymous ,
I would also take a moment to thank Zanqueta , for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions
Hi Anonymous ,
I hope the information provided above assists you in resolving the issue. If you have any additional questions or concerns, please do not hesitate to contact us. We are here to support you and will be happy to help with any further assistance you may need.