web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Selectable SVG Map usi...
Power Apps
Unanswered

Selectable SVG Map using PCF Component

(0) ShareShare
ReportReport
Posted on by 39

Hi All,

I want to display the United States Map with an option to select multiple states. For that, I have used the US Map in SVG format. With the out of the box Image control, I couldn't achieve that because I was not able to perform multiple selections in the Map by that method and I want that multiple selection functionality in the Map. So, I am trying to achieve that using PCF now.

 

For that, I have attached the onClick event listener to the Path tag of SVG and triggered a function onClick of any states.

It is working fine in PCF Test Harness, but when I import that in PowerApps, It does not work properly. On click of any states, the attached function is not getting triggered in PowerApps and thus I am not able to make multiple selections in that Map. In fact, I am not able to make any selection when we import our PCF component in PowerApps.

 

I have searched a lot about the solutions for this issue but I did not get that till now. Can someone help me with some solution to this?

Is there any way to achieve the selectable functionality using SVG Map in PowerApps? Is there any way to achieve the selectable functionality in PowerApps? 

 

Please feel free to suggest your ideas to achieve the above requirement. Let me know if you want any additional information about this.

Thanks in advance.

 

 

 

I have the same question (0)
  • Verified answer
    optimisticdipak Profile Picture
    39 on at

    I got the solution for this issue. 

    The default styling for an SVG tag in PowerApps is,

    svg{
    
     pointer-events: none;
    
    }

    PowerApps has blocked the pointer-events for the SVG tag and that's why I was not able to select the states on my SVG map of the USA. 

    I added the following code in the external CSS file of my PCF Component and the issue got resolved.

    [Add your PCF path] svg{
    
     pointer-events: auto !important;
    
    }

     

    This code will override the default styling of SVG in PowerApps with the above styling.

     

    Thanks a lot.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard