cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Nabss
Helper I
Helper I

Display country and region of the user into a map

Hi,

 

Do you know if it's possible to show a country and a region (europe, africa etc...) into a map and not a text label ?

 

powapp.PNG

 

Thanks !

1 ACCEPTED SOLUTION

Accepted Solutions
Expiscornovus
Super User
Super User

Hi @Nabss,

 

Just had another look at this request. Turns out there is new feature in preview which makes it possible to import GeoJSON shapes into the map control:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/geospatial-map-draw-shapes#import-geojs...

 

This makes it possible to draw a map of a country if you have the collection of coordinates of the borders.

 

geojson_mapcontrol.png

View solution in original post

4 REPLIES 4
Expiscornovus
Super User
Super User

Hi @Nabss,

 

It depends a bit on how you want to show these countries on the map. Do you want to fill the whole country/region with a colour or is it sufficient to just place a shape in the country/region?

 

For the latter you could have a look at the map control:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/geospatial-component-map

 

However, as far as I am aware that control doesn't have a property to fill the map. 

 

That is why in the first scenario I would personally have a look at Power BI instead. In there you have a Filled Map shape which could easily be used. See the example below.

 

filledmapcontrol.png

v-qiaqi-msft
Community Support
Community Support

Hi @Nabss,

Do you want to create pins of region and country in the Map?

Could you please share a  bit more about your scenario?

 

Actually, there is no way to make the region and country display in the map directly in Power Apps.

As an alternative solution, you could consider adding a Gallery to display regions and countries. Then you could make the map highlight countries with different colors once you click in the Gallery.

Here is a blog you could check reference to:Dynamic Country Maps in PowerApps – Rene Modery

Best Regards,
Qi
Expiscornovus
Super User
Super User

Hi @Nabss,

 

Just had another look at this request. Turns out there is new feature in preview which makes it possible to import GeoJSON shapes into the map control:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/geospatial-map-draw-shapes#import-geojs...

 

This makes it possible to draw a map of a country if you have the collection of coordinates of the borders.

 

geojson_mapcontrol.png

View solution in original post

hemrhk
Post Patron
Post Patron

Checkout this blog post to implement map control in canvas app.

 

https://365stack.in/index.php/2021/12/25/build-interactive-map-control-on-canvas-app/ 

 

Follow 365 Stack for instant updates.

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (2,791)