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 II
Super User II

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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

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

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,382)