SugarCRM invalid request in google maps
Unfortunately, we didn't know what caused this problem but we settled on solving this issue by formatting the embedded URL explicitly.
Related videos on Youtube
Gunnar Gunnarsson
Updated on December 02, 2022Comments
-
Gunnar Gunnarsson over 1 year
I am using SugarCRM with several registered accounts. Each of the accounts have registered billing addresses and related information that are thrown into an embedded google map as parameters and displayed under a tab called Location Map.
The embedded URL looks like this: https://www.google.com/maps/embed/v1/place?key=AIzaSyC1AkgX6WPT3_arbJZTQtLYkT_bz0rz5oQ&q={billing_address_street}, {billing_address_city}, {billing_address_postalcode}, {billing_address_country}
This works fine for some addresses but it returns an error (The Google Maps API server rejected your request. Invalid request. Missing the 'q' parameter.) when using others. Link to a comparison, the second URL is invalid
The second link is invalid since it has amp; where it isn't supposed to be. Does somebody know why this happens and how I can prevent it?
-
chutz over 11 yearsWhat is the question here? And what did you do to try and find the answer?
-
Gunnar Gunnarsson almost 7 yearsI found out that & is a way to encode an ampersand (&) and it appears that in the latter case, the ampersand is not being properly parsed
-
Reisclef almost 7 yearsIf you resolved your problem, you might consider adding an answer, and marking it as accepted, or deleting your original question.
-
-
Gunnar Gunnarsson almost 7 yearsThanks @Reisclef, I added an answer :)