cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ericonline
Community Champion
Community Champion

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

Hello,

 

I'm following the instructions here: https://powerusers.microsoft.com/t5/General-Discussion/Google-map-and-pin-in-PowerApps/td-p/3209/pag... 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

1 ACCEPTED SOLUTION

Accepted Solutions
ericonline
Community Champion
Community Champion

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. 

View solution in original post

1 REPLY 1
ericonline
Community Champion
Community Champion

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. 

Helpful resources

Announcements
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 (2,583)