cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Solution Sage
Solution Sage

Re: Google map and pin in PowerApps

Hello

 

Is it possible that you have put the latitude and longitude wrong? Try to change the order. For example if you have y for latitude and x for longitude, change it and have x for latitude and y for longitude.

 

Kind regards,

Mike

Highlighted
Anonymous
Not applicable

Re: Google map and pin in PowerApps

Hi Mike

I believe my problem is because I have not yet added my Google API key to my PowerApps Connections.

I have tried many URL's with my API key inside and I cannot seem to crack it.

Have you gotten past this screen shot before?:

Untitled-1.jpg

I greatly appreciate your concern Mike! You're a good man! 🙂

Regards
Lorcan

Highlighted
Solution Sage
Solution Sage

Re: Google map and pin in PowerApps

Hello Lorcan,

 

I followed Mark's instructions and it worked for me. 
I thought that you said that you had a foreign location on the map and I thought that you had just put the coordinates in the wrong order. I don't know if your problem is that haven't added the API key to your conections and how you can fix it. I am a beginner. So, ckeck again Mark's post, keep trying and good luck.

 

Kind regards,

Mike

Highlighted
Anonymous
Not applicable

Re: Google map and pin in PowerApps

Thanks Mike,

Yes I can get it to bring up other locations but not my own.
I have copied the exact URL's that Mark put in his explanations however I keep getting foreign locations.

Did you link your Google static API key inside your PowerApps Connections or not?

Regards
Lorcan

Highlighted
Solution Sage
Solution Sage

Re: Google map and pin in PowerApps

No I didn't. As I can see Mark's instructions don't have this step.

 

Kind regards,

Mike

Highlighted
Anonymous
Not applicable

Re: Google map and pin in PowerApps

Could you maybe just give me a quick explanation of what Mark meant by this:

LATER...
REPLACE all hard-coded references to a LAT/LONG with PowerApps "Location.Latitude" and "Location.Longitude", and you'll be capturing not only LAT/LONGs in your mobile app, but you'll have a nice image to CONFIRM you got the location right. 

After this I promise to leave you alone in peace 😉

Regards
Lorcan

Highlighted
Frequent Visitor

Re: Google map and pin in PowerApps

I Haven't tried this yet, but I assume mark meant something like this:

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

Highlighted
Anonymous
Not applicable

Re: Google map and pin in PowerApps

CarlN!!!!!!! Mr. CarlN


I thank you sir. I have been struggling through many dark nights with this, I thank you.

And to you Mike. Many thanks gentlemen.

If you ever have any quesries please do let me know I may be able to assist!
HUGE SMILES right now! 😄

Cheers
Lorcan

Highlighted
Helper II
Helper II

Re: Google map and pin in PowerApps

This code works

 

"https://maps.googleapis.com/maps/api/staticmap?center=-22.41517,-46.973&zoom=20&size=640x240&key=MY-KEY&markers=color:red%7Clabel:A%7C-22.41517,-46.973"

 

Substituting: -22.41517, -46.973, for text fields, I had localization problem because I was in Brazil, Location.Latitude provided with -22,41517, with the function Text formatted the (,) by (.).

https://powerapps.microsoft.com/en-us/tutorials/function-text

 

But Location works perfectly on PowerApps Web (2.0.602) and Desktop (2.0.600), but on the Android (PowerApps Mobile: 2.0.600) mobile phone, it works, but after opening and closing the application it has not worked anymore.

 

I created buttons that Disable(Location) and Enable(Location)

 

https://powerapps.microsoft.com/en-us/tutorials/signals/

https://powerapps.microsoft.com/en-us/tutorials/function-enable-disable/

The Enable and Disable functions turn signal on and off, respectively.
These functions currently only work for the Location signal.

 

Attached is the application I made to use the Location function, placing Google's apikey on [MYKEY].

https://1drv.ms/u/s!AijLzG3PzbargXKnPyRVUDz4nT9c

 

It works on PowerApps Web and Desktop always, but on Mobile it works initially, but stops working without showing any error message.

 

Desktop

1pc-open-gps.jpg2pc-gps-disable.jpg2pc-gps-enable.jpg

 

 

 

 

 

 

 

 

 

 

 

 

Mobile

1mobile.png2mobile.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

How to work perfectly and always on Mobile?

I do not know what else to do.


Highlighted
Frequent Visitor

Re: Google map and pin in PowerApps

Hi AvenaFernando,

 

I've had the same experience. We've previously also programmed Android (using Android Studio) and experienced problems accessing the Location services.

On the newer Android OS's, one actually has to access location information through Google Play services rather than directly from the location services. This is "a known" issue on android, and I can only think that the Powerapps implementation is to access loaction services directly, which would give exactly this result (i.e. not updating the loations correctly: initially the locations come through correctly, and then it seems to "Freeze", always returning the same location). Interestingly, you don't get an error when accessing the Location Services directly, it just doesn't return accurate/valid locations...

 

I feel this is something that MS should look into...

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (7,321)