Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
allison_t
Frequent Visitor

Polygon Reference Layer in Azure Map

Hi! I've added a reference layer to my Azure map in PowerBI but it is not visible on the map. At first I was getting an error that the file could not be parsed, but I'm no longer getting that message. Here is what's in my geojson file:

{
"type": "Feature",
"geometry": {
"type":"Polygon",
"coordinates":[
[ 57.0, -162.0 ],
[ 56.0, -162.0 ],
[ 56.0, -164.0 ],
[ 57.0, -164.0 ],
[ 57.0, -162.0 ]
]
},
"properties": {
"fillColor":"#FF8A8A"
}
}

1 ACCEPTED SOLUTION
mroot
Frequent Visitor

Hi allison_t,

If you want to add a polygon to your Azure Maps visual as a reference layer you have to format your .json or .geojson slighly differently than a point feature. Here is a link to give you an idea: GeoJSON - Wikipedia.

But for your example, try changing it to the below code snippet. I noticed that in your example the polygon lands to the east of Madagascar.

That should get you going, if you are looking for a solution that will help you build complex polygons, bring them into Power BI, and link those polygons to your dataset, check out the EasyTerritory Power BI visual  Territory Visual by EasyTerritory

 

{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[57.0,-162.0],[56.0,-162.0],[56.0,-164.0],[57.0,-164.0],[57.0,-162.0]]]]},"properties":{"fillColor":"#FF8A8A"}}]}

 

azure-maps-reference-polygon-layer.png

 

Take care,

 

Matt

 

 

View solution in original post

2 REPLIES 2
mroot
Frequent Visitor

Hi allison_t,

If you want to add a polygon to your Azure Maps visual as a reference layer you have to format your .json or .geojson slighly differently than a point feature. Here is a link to give you an idea: GeoJSON - Wikipedia.

But for your example, try changing it to the below code snippet. I noticed that in your example the polygon lands to the east of Madagascar.

That should get you going, if you are looking for a solution that will help you build complex polygons, bring them into Power BI, and link those polygons to your dataset, check out the EasyTerritory Power BI visual  Territory Visual by EasyTerritory

 

{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"MultiPolygon","coordinates":[[[[57.0,-162.0],[56.0,-162.0],[56.0,-164.0],[57.0,-164.0],[57.0,-162.0]]]]},"properties":{"fillColor":"#FF8A8A"}}]}

 

azure-maps-reference-polygon-layer.png

 

Take care,

 

Matt

 

 

@mroot Thank you!! I couldn't find examples of a polygon and had started with a point feature example that I found, that would explain where I missed a few steps. Appreciate your help!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.