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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.