Forum Discussion
Mapbox visual with multiple countries does not zoom in to the selected country
Hi Malick - Your issue with the Mapbox visual in Power BI not zooming in automatically to the selected country is likely related to the configuration of the "comp_key" field and its interaction with Mapbox’s dynamic zoom functionality.
In the Power BI Mapbox visual, make sure that “Auto-Zoom” is enabled in the visualization settings if this option is available. This setting ensures that the map zooms into the area relevant to the filter selection.
If you don’t see an “Auto-Zoom” option, check if Mapbox updates have introduced any specific instructions on how to use location-based zoom with Power BI.
Mapbox doesn’t automatically recognize filters from Power BI to trigger zooming. You can try using a Power Automate integration to explicitly control the map view, but that requires custom scripting.
Mapbox provides documentation on using custom tilesets and Power BI integration
below link FYR:
Tilesets | Mapbox Docs | Mapbox
If these steps don’t resolve the issue, there may be a limitation in the Power BI integration with Mapbox, and you could consider reaching out to Power BI or Mapbox support for further assistance.
Hope this information helps.
- Malick1 year agoRegular Visitor
Thanks for replying rajendraongole1 . The auto zoom is enabled. I have tried importing a new tileset with just the country boundaries to see if the issue was with the 'comp_key' which is a unique identifier for each location in the tileset, but unfortunately, the zoom in does not work with country boundary as well. I wonder if there is any solution to this problem or should I be using another approach / visual type to show data at sub-national level.
- rajendraongole11 year ago
Super User
Hi Malick - Since auto-zoom and using the comp_key as a unique identifier for each sub-national location haven't resolved the issue, it might indeed be worth exploring alternative visuals or approaches.
alternatives like ArcGIS Maps for Power BI and Drill Down Map visuals are likely the most straightforward alternatives if automatic zooming with slicers is essential for you. These alternatives often provide better zooming and filtering at sub-national levels without extensive setup. Let me know if you'd like detailed guidance on any of these specific approaches!
Feel free to mark the right answer as solution and I wouldn't mind kudos. thank you
- Malick1 year agoRegular Visitor
Thanks for the advice. I'll appreciate if you can provide guidance or point me to the online resource on both atcgis and drill down maps usage in Power BI.