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 control: get click...
Power Apps
Unanswered

Map control: get clicked location

(0) ShareShare
ReportReport
Posted on by 307

Working on learning maps...

 

We have a map control 'Map1'. I'm just working on getting the clicked location. Doesn't appear to work. Tried a few things, searched a ton for what I might be missing. Coming up blank.

 

I have this code in the OnSelect of Map1; added the notification trying to check if anything looks to be happening.

 

ClearCollect(
 colLocation,
 {
 LocLat:Map1.ClickedLocation.Latitude,
 LocLong: Map1.ClickedLocation.Longitude
 }
);

Notify("Clicked: " & First(colLocation).LocLat,NotificationType.Success,2000)

 

Then I have a label trying to display the lat long, this is in the Text property

 

"Latitude: " & First(colLocation).LocLat & " Longitude: " & First(colLocation).LocLong

 

Thank you

 

@LaurensM @FLMike @WarrenBelz 

Categories:
I have the same question (0)
  • STS1SS Profile Picture
    307 on at

    Well, I had tried this before and it did not work, now it does...

     

    In the  'Text' property:

     

    Map1.ClickedLocation.Latitude & "," & Map1.ClickedLocation.Longitude

     

    So if anyone can inform me why the aforementioned attempts fail, that would be great.

     

    It seems like sometimes reloading the page a few times is all I need.

  • Rolson1 Profile Picture
    45 on at

    did you ever figure this out?  I have a map control that works on desktop but not on tablet or mobile.  Just can't get anything to trigger when i click my icons

  • STS1SS Profile Picture
    307 on at

    What I have typed there...

    In the  'Text' property:

     

    Map1.ClickedLocation.Latitude & "," & Map1.ClickedLocation.Longitude

     

    It works fine. It wasn't at first, and then started working. I honestly think there are some issues with updates... like the app and what is on the server vs what you're dealing with can vary and so the code sometimes falls over. Just my opinion. Anyway, that works.

     

    LMK if you need help

     

  • Rolson1 Profile Picture
    45 on at

    Thanks for the reply.  This works on my PC when I'm editing but when i publish it doesn't work on my devices.  Never encountered an issue like this.  

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard