cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Substitute Decimal for Latitude, Longitude

Hello, 

 

I want to use bing maps in my power app. By using GPS i get the Latitude and Longitude with a "," Seperator. 

Bing maps can not use this information. I have to delete the coma and substitute it with a dot. Only if i do this i get a map in power apps. 

 

Can someone tell me please how to change the settings to get coordinates with Decimalseparator "."

 

I use the following function to get the Latitude and Longitude:

 

If(tglGPSLocation.Value;Location.Latitude&","&Location.Longitude;" ")

 

Thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Thanks for your help.

 

I finale found a solution for my problem. 

I change my Browser setting to UK. 

Know ist works like I need it

View solution in original post

13 REPLIES 13
PowerAddict
Super User
Super User

Can you try

If(tglGPSLocation.Value;Location.Latitude&"."&Location.Longitude;" ")

I am assuming this didn't work for you. So can you try:

Substitute(If(tglGPSLocation.Value;Location.Latitude&","&Location.Longitude;" "), ",",".")

Let me know if this helps.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

Thanks!
Hardit Bhatia
The Power Addict
https://thepoweraddict.com
Anonymous
Not applicable

Thank you for your suggestion. 

 

In my function i get the coordinates, but with the wrong decimal separator.

 

Your suggested function does not work in my case. With your function I do not get any coordinates.

 

Thanks

Did you try both the suggested solutions?

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

Thanks!
Hardit Bhatia
The Power Addict
https://thepoweraddict.com
Anonymous
Not applicable

Yes, i try both. 

 

The first one only change the comma between Latitude and Longitude in a dot.  But here I need the comma.

 

The second function does not work. 

Sorry may be I am confused by this:
"Bing maps can not use this information. I have to delete the coma and substitute it with a dot. Only if i do this i get a map in power apps."

And then this:
"The first one only change the comma between Latitude and Longitude in a dot. But here I need the comma."

I thought you wanted the comma to be replaced with a dot. Is that not true?

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

Thanks!
Hardit Bhatia
The Power Addict
https://thepoweraddict.com
Anonymous
Not applicable

sorry for the confusion. 

 

When i am using the function I get the coordinates e.g. (52,8888,12,34565). 

The first part is the Latitude(52,8888) Bing maps can not show me this coordinates on the map because it needs a data without the coma, but with a dot (52.888). 

The second part is the Longitude(12,34565). Here it is the same problem.

But between this to coordinates it must be the comma. 

In result the data must have the form: 52.8888,12.34565

 

 

 

Got it, makes sense.

Try this:

If(tglGPSLocation.Value;
Substitute(Location.Latitude,",",".") &
","
&
Substitute(Location.Longitude,",",".");" ")

Let me know if this helps.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

Thanks!
Hardit Bhatia
The Power Addict
https://thepoweraddict.com
Anonymous
Not applicable

It does not work.  I do not get any values.

I believe I may have understood the issue. Can you please try one more thing?

If(tglGPSLocation.Value;
Substitute(Text(Location.Latitude,",","."))
&
","
&
Substitute(Text(Location.Longitude,",","."))
;" ")

Let me know if this works.

---
If you like this reply, please give kudos. And if this solves your problem, please accept this reply as the solution.

Thanks!
Hardit Bhatia
The Power Addict
https://thepoweraddict.com

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,508)