Coordinates number format

Hey there, I got coordinates lat lng numbers which sometimes it comes like;


And sometimes


These coordinates at the end are converted to string and shown on the screen, I need to make them always with 6 digits after the period, like;


For example, if it’s


I format it to


If it’s

-22.327 then show it like -22.327000

This var is declared as float64 and I apprecciate ante help. Tnx.

Maybe you should take a look at: and:

Format with %0.6f

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.