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 / "Invalid use of "." " ...
Power Apps
Answered

"Invalid use of "." " when using Location.Longitude/Latitude

(0) ShareShare
ReportReport
Posted on by

Hello,

 

I'm following the instructions here: https://powerusers.microsoft.com/t5/General-Discussion/Google-map-and-pin-in-PowerApps/td-p/3209/page/3 and can create the map and such without issue. I even have Location.Latitude and Location.Longitude working in the google map URL:

 

"https://maps.googleapis.com/maps/api/staticmap?center=" & Location.Latitude & "," & Location.Longitude & "&zoom=18&size=600x600&key=<myAPIKey>=color:red%7Clabel:A%7C"

 

However, when I try to use Location.Latitude or Location.Longitude in a function, Intellisense does not correctly highlight the function. I get the error "Invalid use of "." pointing me to the period between Location and Latitude/Longitude. 

 

Anyone else having this issue? It worked fine THE FIRST TIME I typed the function. Now won't work. 


Thanks

Categories:
I have the same question (0)
  • Verified answer
    Community Power Platform Member Profile Picture
    on at

    AHA! Figured it out... 

     

    The Location function cannot be called from a button inside a form Card. If button is outside the card, not problem. If INSIDE the card, the error appears. 

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard