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 / 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:
I have the same question (0)

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 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard