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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (4,481)