Showing results for 
Search instead for 
Did you mean: 
Resolver III
Resolver III

Map Pin Icons and Mouse Clicks

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:


















Now I created a new collection like this



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.



Helpful resources

Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,854)