Map Report Loading

Dear team,

Kindly help with the below:

On my Survey solutions HQ instance, when I ckick on Reports-Maps, it loads for a second then brings an error with instruction to chdck on the Javascript error.

On checking, it talks about api key which I have faithfully created andadded on my instance… Could there be something am missing?

Best

What does the error say? (verbatim).

Hello,

Please see attached image for the error.
Uploading: 20210217_155342.jpg…

Hello,

Here is the attached screenshot for the error.

“Something went wrong” is not a description that we can follow up on.
The message instructs to “see the JavaScript console for technical details” and these details is where we go next (to console).

Hello, about this problem

Can you tell us how you fixed it? I mean could you give us more details?
Thank you

Regarding this issue I did buy an SSL Certificate and installed on my server. This then allowed Secure requests to the Google Maps API.

Hi Survey Solutions team,

I have a local installation of Survey Solutions, but my map report shows the following error:

I did step by step these instructions to get my ApiKey from google maps but I have not set up a billing, is it necessary to set up a billing to use the Google Maps APIs in Survey Solutions?

I configured ApiKey in my local installation according to these instructions.

Can anyone help me to solve this problem and see the map report without errors?

Thanks for help me.

Does the Local solution have a SSL cert installed. I had the same problem and resolved it by having an SSL cert installed. It should work fine after the cert installation on your Local instance installation.

This is the url https://msisee.bch.hn/, when you verify the certificate of this site, you see that you have a valid certificate and the url starts with the secure http protocol (https).

The screenshot shows: InvalidKeyMapError.

Google documents their error codes at this page: Error messages.

According to their description this error corresponds to the following situation:

The API key included in the script element that loads the API is not found. Please make sure you are using a correct API key. You can generate a new API key in the Cloud Console.

I looked up the error code and read it, then I created new credentials and my error continued, so my conclusion was that my problem is related to enabling billing, but I want to know if I am wrong or if I am doing something wrong.

This is the key that I am using in the file appsettings.Production.ini specifically in the parameters

[GoogleMap]
ApiKey=%Your API key%

But I don’t know what is the problem with the generated key. :frowning_face:

@sergiy excuse me, how should we define the Api key in the appsettings.Production.ini file?

[GoogleMap]
  • ApiKey=%ABCD…XYZ%
  • ApiKey=“ABCD…XYZ”
  • ApiKey=ABCD…XYZ

0 voters

Thanks.

Hello, Kevin,

the list of errors contains BillingNotEnabledMapError, which I think it would return if the problem was related to billing.

ApiKey="AI...Ow"

should be the notation in the settings file.

Best, Sergiy

1 Like

Hello @kv700032 ,

just following up on this issue, did you manage to make it work in the end? or is this still showing as a problem?

Best, Sergiy

Hello @sergiy,

Thanks to your help and collaboration we managed to correct our first error, since we had the ApiKey wrongly defined in the appsettings.Production.ini file (we were using ApiKey =%AI … Ow%).
When correcting it we were able to see the BillingNotEnabledMapError error

So with that we discovered that it is necessary to enable billing to use the Google Maps ApiKey.

We have temporarily enabled billing (because some paperwork is required at the Bank to buy these services) and the map report no longer shows the watermark; however, on that local server, a survey with questions about GPS has not yet been conducted.

In addition, it would be convenient to add in the documentation of the use of the Google Maps ApiKey, the APIs that must be enabled to obtain the functional ApiKey in Survey Solutions.
(In my case, I have these 5 APIs enabled: Maps Embed API, Maps JavaScript API, Maps SDK for Android, Maps Static API and Places API, but I don’t know if these 5 APIs are necessary.)

Again, thank you very much for your help and for always collaborating.