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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Map Pin Icons and Mous...
Power Apps
Unanswered

Map Pin Icons and Mouse Clicks

(0) ShareShare
ReportReport
Posted on by 260

I am trying to get two different things working in a canvas app with a map control.

The first issue is to have custom pin icons based on a column in a collection.  But a little background first.  The collection gets formed from a SharePoint list with a lot of columns the app needs, but no pin image.  Rather, I have a collection with two rows built as

ClearCollect(colIconshapes,Table({Name: MarkerBallPin, Pic:'marker-ball-pin'}, {Name: Car, Pic: car}));

I inserted the icon images in media controls and the collection displays the images perfectly as shown below:

 

lmheimendinger_0-1633374509318.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Now I created a new collection like this

ClearCollect(colSeqMap,AddColumns(collSchedule,"Pic",galIconShapesHidden.Selected.Pic));

 

This should work since the selected gallery item is the icon I want to be the default one for all map pins.  But after this command, the Pic column seems to be blank in the collection records.  So I then did this 

 

Set(varUnSeq, galIconShapesHidden.Selected.Pic);

ForAll(colSchedule,Patch(colSeqMap,LookUp(colchedule,TxnID=TxnID), {Pic:varUnSeqPic}));

 

I still don't see a value in Pic.

On the map properties, I have set ItemIcons to "Pic"; if Pic had a value, is this the correct property setting to display the icon?

 

Next Issue:

What I then want to do is allow a user to click on a pin that will change the pin icon to a different value and other stuff which is not pertinent to solving this, but I don't think that is possible.  Am I mistaken?  There can be actions for a click anywhere on the map or when a pin is changed, but I want to trigger the change when the pin is clicked (I currently have the card displayed OnHover).  When the pin is clicked, how would I identify which one - associated with the gallery that has the collection as items is what I would need.  I could then Patch a new value for Pic.

If the pin click won't work, then please help me solve the icon display issue.

 

Thanks in advance.

 

Categories:

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 394 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 324 Most Valuable Professional

Last 30 days Overall leaderboard