Google Maps - Missing the 'q' parameter

Attempting to use the WebMapViewer. I have the API Key entered. However, when the code is run, I receive the following error message on the Map object on the web page:

Google Maps Platform rejected your request. Invalid request. Missing the ‘q’ parameter.

Does anyone have any words of wisdom on this one?

Q is the search parameter. You need to put in a place or address.

q = query

Please can you provide an example ?

2 Likes

google api is very difficult to setup online and it need also a valid payment method.
it is not only a xojo example that will work out of the box.
after many hours of testing at last i gave up.

Yep. A bit disappointing. The example doesn’t work either. I suspect like you say it’s down to google locking it down

hi, I also wrote to your technical support to get explanations on how to make webMapViever work in xojo post 2020 releases

your support suggested that I try to use a connection to the https web app (although I am currently testing everything in debug, I produced a standalone executable and did what I was told using an invalid https certificate but using an https connection and the problem is the same.)

Can you indicate the documentation of ‘q parameter’ or show us some code with which the webMapViewer works also in the xojo post 2019 release?

(ps. i have e functional google api key and it works on 2019)

Thank you so much, I look forward to it.

I also tried using the Eddie’s electronics sample application, initializing the apikey with my apikey (which goes with 2019), otherwise the eddie’s app hides the webMapViewer, but even here the control doesn’t work.

from this app i can deduce how the search method of the new webMapViewer works,

Var location As String = CityField.Text + ", " + StatePopup.SelectedRowValue + " " + ZipField.Text
CustomerLocation.ModeData = location
CustomerLocation.Search(location)

but there must be something wrong. I hope you can give us some more info…

Hello all, I just had this problem today. Try changing the mode of the map to View. In my case, it shows the map at least