cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Google Maps API error: MissingKeyMapError

Highlighted
Regular Member

Google Maps API error: MissingKeyMapError

I used several times Google Maps widget, but in a recent ThingWorx installation on MS Azure cloud, I had the following issue when the Mashup is loaded.

Capture.PNG

Obviously, the Google Maps ThingWorx extension was correctly imported in my ThingWorx 7.1.3 environment.

Does anyone have an idea about how to solve it?

21 REPLIES 21

Re: Google Maps API error: MissingKeyMapError

Hi Davide,

For production environment you should put your Google Maps API Key on the extension.

To do this, apart of registering on Google API services, you should decompress the extension and modify the extension as described on TW Google Widgets documentation: Google Widgets

Re: Google Maps API error: MissingKeyMapError

Hi Carles,

I'm using it for a POC in a demo environment, therefore it is not intended for production. Why does the same extension work fine in all the other environments where I installed?

Re: Google Maps API error: MissingKeyMapError

I don't know, I've also use it on dev side without an API Key and it works, but maybe you are doing to many calls or for some other reason.

Re: Google Maps API error: MissingKeyMapError

Could it be due to MS Azure cloud environment?

Re: Google Maps API error: MissingKeyMapError

Davide, it could possibly be because of the Azure cloud instance and around its business account implementations. You would need an API key to render the map.

Re: Google Maps API error: MissingKeyMapError

I've just tried the new TWX 7.1.3 and I have the same problem and not on MS Azure Cloud.

Re: Google Maps API error: MissingKeyMapError

I've tested on 7.1.3 without issues.

One thing that happened to me, it was that I had an API Key embedded on google maps extension which doesn't allowed the server domain where I was testing it to be executed.

If you want to test it without API Key, better you download the Google Maps extension from the Market Place and import on your instance, refresh correctly the browser.

Re: Google Maps API error: MissingKeyMapError

Hi, I'm having the same issue.

I have a linux VM on Azure cloud enviroment and I installed TW 7.2

If I open my mashup from the VM I have no problem but if I open it from any other browser (http://<vm-staticIp>/Thingworx/Composer/index.html) I have the same API problem.

I modified the metadata.xml like this (line 9)

<Widget name="googlemap">

  <UIResources>

  <!-- Studio ONLY -->

  <FileResource type="CSS" file="googlemap.ide.css" description="" isDevelopment="true" isRuntime="false" />

  <FileResource type="JS" file="googlemap.ide.js" description="" isDevelopment="true" isRuntime="false" />

  <!-- Runtime/Squeal ONLY -->

  <FileResource type="CSS" file="googlemap.runtime.css" description="" isDevelopment="false" isRuntime="true" />

  <FileResource type="JS" file="googlemap.runtime.js" description="" isDevelopment="false" isRuntime="true" />

  <FileResource type="JS" url="https://maps.googleapis.com/maps/api/js?v=3;key=AIzaSyB-r4RABSM6VLFRGdrF1UUcQOx--N1jKfA=false" description="" isDevelopment="false" isRuntime="true" />

  </UIResources>

</Widget>

according to what I got from the help page, but I still have no satisfying results.

My questions:

  1. Should it be a Server API Key or a Browser API Key?
  2. On my browser, shell I write https?

Re: Google Maps API error: MissingKeyMapError

Just to say, this is how it worked for me

<FileResource type="JS" url="https://maps.google.com/maps/api/js?key=<My Api Key>;sensor=false" description="" isDevelopment="false" isRuntime="true" />