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
mikegee78
Frequent Visitor

Drawing a Geofence on A Map

I have a set of coordinates that make up a geofence.  Is there a way to draw this on a map in PowerBI?  I was able to create it in another BI tool, so this is generally what I am looking to do.

Geofence.PNG

 
 
2 ACCEPTED SOLUTIONS
TomMartens
Super User
Super User

Hey @mikegee78 ,

 

you can use the Shape map visual to draw your own shapes,

the mapbox visual (available from the custom visual store) allows to draw custom tileset layer.

 

My favorite solution is the new and upcoming new version of the custom visual called IconMap by @jamesdales , there is a current version available that you can download for testing: https://onedrive.live.com/?authkey=%21AK8vSX3Z%2DTayOlA&cid=22B630B3F47C4C3B&id=22B630B3F47C4C3B%219...

There is also documentation: https://powerbi.jamesdales.com/how-to-use-icon-map/

 

Hopefully, this is what you are looking for.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

Thanks Tom.

 

Yes, Icon map will do what you need there. 

 

There are a few ways of achieving this with Icon Map.

 

GeoJSON: This needs the boundaries to be specified in an external geojson file. https://en.wikipedia.org/wiki/GeoJSON

 

WKT: The boundaries need to be specified in a field in the data. eg POLYGON((-24.06 65.57, -25.06 63.57, -26.06 67.57, -23.06 66.57, -24.06 65.57))  https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry 

 

The report user will be able to select the geofences (or not depending on the map settings). The colors can be set by providing an RGB value in the "Circle / Line / WKT / GeoJSON Outline Colour" field - eg #FF0000 for Red. If you provide #00000000 as the fill colour, the shapes will be transparent, but still show the outline as the last two digits represent opacity.

 

You need to use the beta version of Icon Map from the link that Tom provided as this functionality is not yet in the store version. 

I'm working on updating the documentation and providing samples and videos at the moment, but happy to help in the meantime.

 

Also as Tom mentions, you'll be able to create a layer or tileset in Mapbox Studio (studio.mapbox.com) and use these in Power BI. If you need to interact with the geofences, you need to create it as a tileset, then import it as a choropleth layer in the Mapbox visual.

 

Thanks

 

James

 

 

 

 

 

 

View solution in original post

3 REPLIES 3
TomMartens
Super User
Super User

Hey @mikegee78 ,

 

you can use the Shape map visual to draw your own shapes,

the mapbox visual (available from the custom visual store) allows to draw custom tileset layer.

 

My favorite solution is the new and upcoming new version of the custom visual called IconMap by @jamesdales , there is a current version available that you can download for testing: https://onedrive.live.com/?authkey=%21AK8vSX3Z%2DTayOlA&cid=22B630B3F47C4C3B&id=22B630B3F47C4C3B%219...

There is also documentation: https://powerbi.jamesdales.com/how-to-use-icon-map/

 

Hopefully, this is what you are looking for.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Thanks Tom.

 

Yes, Icon map will do what you need there. 

 

There are a few ways of achieving this with Icon Map.

 

GeoJSON: This needs the boundaries to be specified in an external geojson file. https://en.wikipedia.org/wiki/GeoJSON

 

WKT: The boundaries need to be specified in a field in the data. eg POLYGON((-24.06 65.57, -25.06 63.57, -26.06 67.57, -23.06 66.57, -24.06 65.57))  https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry 

 

The report user will be able to select the geofences (or not depending on the map settings). The colors can be set by providing an RGB value in the "Circle / Line / WKT / GeoJSON Outline Colour" field - eg #FF0000 for Red. If you provide #00000000 as the fill colour, the shapes will be transparent, but still show the outline as the last two digits represent opacity.

 

You need to use the beta version of Icon Map from the link that Tom provided as this functionality is not yet in the store version. 

I'm working on updating the documentation and providing samples and videos at the moment, but happy to help in the meantime.

 

Also as Tom mentions, you'll be able to create a layer or tileset in Mapbox Studio (studio.mapbox.com) and use these in Power BI. If you need to interact with the geofences, you need to create it as a tileset, then import it as a choropleth layer in the Mapbox visual.

 

Thanks

 

James

 

 

 

 

 

 

@jamesdales and @TomMartens  Thank you for your assistance.  The Icon map seems to accomplish what I need.  One follow up question, if I have two separate geofences, as in the picture I posted, can I get them to appear as different colors?

 

Thanks again!

Mike

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.

Top Solution Authors