Forum Discussion

dualia's avatar
dualia
New Member
1 month ago
Solved

Azure map Netherlands (display 345 municipalities)

Hi everyone, I'm building an Azure Maps visual in Power BI for the Netherlands. Setup 345 Dutch municipalities. Municipality name column categorized as State/Province. Country column added as N...
  • Ritaf1983's avatar
    1 month ago

    Hi dualia 

    I would avoid combining Azure Maps’ automatically geocoded filled boundaries with a custom GeoJSON reference layer.

    These are two independent geometry layers. If the GeoJSON contains all municipalities, most areas may be rendered twice: once by the built-in Filled Map layer and once by the reference layer. With transparency, overlapping polygons appear darker, while municipalities available only in the GeoJSON appear lighter. After applying a slicer, some shapes may disappear from one layer or become unmapped, exposing a different boundary underneath. This can make the apparent municipality size change, although a slicer should never actually modify the geometry.

    There is also an important version issue in the numbers. The Netherlands had 345 municipalities in 2022, but it has had 342 municipalities since 1 January 2023. Make sure the business data and the boundary file use the same municipal classification year. Otherwise, merged municipalities, names and boundaries will not match.

    My recommended setup would be:

    1. Use one complete GeoJSON or Shapefile containing every municipality for the required reporting year.

    2. Include a stable unique identifier in every shape, preferably the official CBS municipality code, such as GM_CODE.

    3. Create a municipality dimension containing one row per municipality and the same code.

    4. Place that municipality code in the Azure Maps Location field.

    5. Upload the complete file as a data-bound Reference Layer.

    6. Place Recycling Method in Legend.

    7. Turn off the standard Filled Map layer so that only one geometry source is rendered.

    8. During testing, enable the Reference Layer’s Unmapped Objects option to identify failed matches.

    9. Remove any predefined color, fillColor or opacity properties from the GeoJSON unless they are intentional. Styles embedded in the spatial file take precedence over Legend and conditional-formatting colours.

    The municipality name should also not be categorised as State/Province. If name-based geocoding is retained, use separate Country and municipality fields and use “Expand all down one level,” because this preserves the Netherlands context. A normal move to the next hierarchy level can geocode municipality names without their parent country, which explains ambiguous matches such as Soest.

    Finally, verify that each municipality has exactly one Recycling Method in the current filter context. Multiple fact rows are not necessarily a problem, but multiple legend categories for the same municipality will create overlapping polygons or ambiguous colouring. If several methods can exist, define a rule such as latest method, primary method or dominant method before using the field as a categorical legend.

    Therefore, I would not try to fix the missing municipalities by adding GeoJSON polygons only for the exceptions. The reliable design is one complete, year-consistent boundary file, one unique municipality code and one data-bound reference layer.

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

  • mattlee's avatar
    1 month ago

    Similar recommendation to the above, but a few things that could help.

    Definitely use your reference layer JSON by itself if you have one. It will load much faster than a round of geocoding followed by dynamically fetching geospatial polygons every time you load the map.

    Second, you can remove the hierarchy and drill setup, and turn off the Filled Map layer as mentioned. This skips geocoding entirely, and is faster. The key matching for the reference layer polygons is a string match based on the location field, so make sure they match 1:1 (your location data strings, and the keys for the polygons in the json map file)

    Lastly, there is a "auto-zoom includes reference layer" that was probably causing your odd slicer auto-zoom issues, there were probably some areas unmatched in both the filledmap and the reference layer and it would look odd as you slicer/clear because it was ignoring some of the unmatched polygons in one of them. Check Map Settings, Default View: