ltd-scarletL
Voiceflowβ€’2y agoβ€’
3 replies
ltd-scarlet

How to switch Google Maps API "plus Code" format?

Hi, I'm fetching a google "plus code" with the Maps API. In the docs of the maps API is written:

Plus codes must be formatted as a global code or a compound code. Format plus codes as shown here (plus signs are url-escaped to %2B and spaces are url-escaped to %20). Global code is a 4 character area code and 6 character or longer local code (849VCWC8+R9 is 849VCWC8%2BR9).

How can VF change the format? Is there any JS needed?

In my example I have the plus code: 9F3975JR+2X but to call the google maps directions API I need the change the format to 9F3975JR%2B2X

How can I do that? Thank you in advance πŸ™‚
Was this page helpful?