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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.