Google Map not showing

Google map displays properly in the IDE, but when it has been installed on Android, the map displays only “Sorry we have no imagery.” I have tried with both my API key and a null entry for the key, and it still doesn’t display a map. EDIT: The map will display if the app is deployed to Volt, but not if built with PhoneGap. Unfortunately, I have other functions that require PhoneGap. Does a PhoneGap build require a special Google Map plugin? Thanks.

Have you tried hooking up the Chrome Remote Debugger to see if there are any error messages on the console there?

I must confess that I hadn’t heard of that, so I googled (of course) it. Now that I have found it, I’ll try to figure out how to use it properly.

Thanks for the suggestion.

OK, I received this error:

nsbFunctions.js

Uncaught Reference error:

google is not defined

line 284 column 5

Update:

I was able to avoid the “uncaught reference” error for google by removing this command: Map1.setMarker()

However, I still have the “sorry we have no imagery” problem with the GoogleMap widget (only when built in PhoneGap). It doesn’t seem to generate an error.

Thanks, Allan

First, don’t start paragraphs with a tab - the discussion board then assumes it is code and formats it incorrectly.

Yes, there is a plugin for Google Maps. Seeing it’s been downloaded 15,000 times in the last month, it’s pretty popular.

https://cordova.apache.org/plugins/?q=google%20maps&sortBy=Downloads

OK, these appear to be the (seemingly) associated errors:

    Could not find cordova.js script tag.

Plugin loading may fail

…followed by 35 more “Content Security Policy” errors:

    Refused to load the image

‘’
because it violates the following Content Security Policy
directive: “img-src ‘self’ data:”.
map.js:15 Refused to load the image
‘’ because it
violates the following Content Security Policy directive:
“img-src ‘self’ data:”.
Gs @ map.js:15
index.html:1 Refused to load the image
‘’
because it violates the following Content Security Policy
directive: “img-src ‘self’ data:”.
index.html:1 Refused to load the image
‘’
because it violates the following Content Security Policy
directive: “img-src ‘self’ data:”.
index.html:1 Refused to load the image
‘’
because it violates the following Content Security Policy
directive: “img-src ‘self’ data:”.
index.html:1 Refused to load the image
‘’
because it violates the following Content Security Policy
directive: “img-src ‘self’ data:”.
js?key=AIzaSyCAlBapSJTTSLsvxqUruWCcjMJs4M4Aq4g&v=3.exp&callback=Map1.refresh:83
Refused to load the image
‘’ because it
violates the following Content Security Policy directive:
“img-src ‘self’ data:”.
_.zf @
js?key=AIzaSyCAlBapSJTTSLsvxqUruWCcjMJs4M4Aq4g&v=3.exp&callback=Map1.refresh:83
index.html:1 Refused to load the image
‘’ because it
violates the following Content Security Policy directive:
“img-src ‘self’ data:”.
index.html:1 Refused to load the image
‘’ because it
violates the following Content Security Policy directive:
“img-src ‘self’ data:”.
index.html:1 Refused to load the image
‘’ because it
violates the following Content Security Policy directive:
“img-src ‘self’ data:”.
index.html:1 Refused to load the image
‘’ because it
violates the following Content Security Policy directive:
“img-src ‘self’ data:”.
index.html:1 Refused to load the image
‘’
because it violates the following Content Security Policy
directive: “img-src ‘self’ data:”.
index.html:1 Refused to load the image
‘’
because it violates the following Content Security Policy
directive: “img-src ‘self’ data:”.
index.html:1 Refused to load the image
‘’ because it
violates the following Content Security Policy directive:
“img-src ‘self’ data:”.
index.html:1 Refused to load the image
‘’ because
it violates the following Content Security Policy directive:
“img-src ‘self’ data:”.
js?key=AIzaSyCAlBapSJTTSLsvxqUruWCcjMJs4M4Aq4g&v=3.exp&callback=Map1.refresh:83
Refused to load the image
‘’ because it
violates the following Content Security Policy directive:
“img-src ‘self’ data:”.
_.zf @
js?key=AIzaSyCAlBapSJTTSLsvxqUruWCcjMJs4M4Aq4g&v=3.exp&callback=Map1.refresh:83
controls.js:134 Refused to load the image
‘’ because it
violates the following Content Security Policy directive:
“img-src ‘self’ data:”.
aK.j @ controls.js:134
controls.js:43 Refused to load the image
‘’ because it
violates the following Content Security Policy directive:
“img-src ‘self’ data:”.
nK @ controls.js:43
controls.js:43 Refused to load the image
‘’ because it
violates the following Content Security Policy directive:
“img-src ‘self’ data:”.
nK @ controls.js:43
index.html:1 Refused to load the image
‘’ because it
violates the following Content Security Policy directive:
“img-src ‘self’ data:”.
index.html:1 Refused to load the image
‘’ because it
violates the following Content Security Policy directive:
“img-src ‘self’ data:”.
index.html:1 Refused to load the image
‘’ because it
violates the following Content Security Policy directive:
“img-src ‘self’ data:”.
index.html:1 Refused to load the image
‘’ because it
violates the following Content Security Policy directive:
“img-src ‘self’ data:”.
index.html:1 Refused to load the image
‘’ because it
violates the following Content Security Policy directive:
“img-src ‘self’ data:”.
index.html:1 Refused to load the image
‘’ because it
violates the following Content Security Policy directive:
“img-src ‘self’ data:”.
index.html:1 Refused to load the image
‘’ because it
violates the following Content Security Policy directive:
“img-src ‘self’ data:”.
index.html:1 Refused to load the image
‘’ because it
violates the following Content Security Policy directive:
“img-src ‘self’ data:”.
index.html:1 Refused to load the image
‘’ because it
violates the following Content Security Policy directive:
“img-src ‘self’ data:”.
index.html:1 Refused to load the image
‘’ because it
violates the following Content Security Policy directive:
“img-src ‘self’ data:”.
index.html:1 Refused to load the image
‘’ because it
violates the following Content Security Policy directive:
“img-src ‘self’ data:”.
index.html:1 Refused to load the image
‘’ because it
violates the following Content Security Policy directive:
“img-src ‘self’ data:”.
index.html:1 Refused to load the image
‘’
because it violates the following Content Security Policy
directive: “img-src ‘self’ data:”.
index.html:1 Refused to load the image
‘’
because it violates the following Content Security Policy
directive: “img-src ‘self’ data:”.
index.html:1 Refused to load the image
‘’
because it violates the following Content Security Policy
directive: “img-src ‘self’ data:”.
index.html:1 Refused to load the image
‘’ because it
violates the following Content Security Policy directive:
“img-src ‘self’ data:”.
2hfunc.js:494 [Intervention] Unable to preventDefault inside
passive event listener due to target being treated as passive.
See document.ontouchmove @ hfunc.js:494

Thanks.

If you are saying that I started a paragraph with a tab, I don’t think that I did so. I pasted some errors for your analysis. Perhaps they contained an ascii 9?

Hello,

Thanks for the reference to the plugin. I have a couple of questions:

Does using that plugin indicate that the GoogleMap in Appstudio was not intended to work in Android apps that are built with PhoneGap?

If so, should I delete the instance of that map in my application?

I haven’t had success in building the app with the cordova GoogleMap plugin. This is the declaration that I’m using in the config.xml:

<plugin name="cordova-plugin-googlemaps" spec="2.3.6">
<variable name="API_KEY_FOR_ANDROID" value="my-map-key" />   
</plugin>

Here is what you posted - see the spaces/tabs at the beginning of the line? I have since corrected it.

It may be what you received, but it’s not what I posted. Perhaps it’s a Thunderbird thing? Here’s a screen shot from my original email:

Here is a hex file of the original email source. As you can see, there are no leading spaces or tabs at the beginning of the sentence. I pursue this minutiae for two reasons: I want to ensure that my posts are following proper form, and not disruptive; I don’t like to be unjustly accused.

I tried to run AppStudio this morning, and received a fatal error (the infamous “script could not be executed” one). I recalled what I had to do when that happened previously: Delete the registry entry for AppStudio and re-enter my serial number. In light of recent events, it was particularly poignant…

Looks like Thunderbird is indeed the culprit for the formatting problem:

http://codeverge.com/mozilla.support.thunderbird/forward-reply-indentation/1397390

Did deleting the registry enter cure the problem?

Yes. Of course, it wipes out existing settings (MRU, and my PhoneGap key), but they’re easily replaced.

Did deleting the registry enter cure the problem?

I hope that this reply doesn’t send extraneous tabs…

I have (sort of) followed your lead in using the SMS plugin, and tried to apply it to the Googlemap plugin that you recommended. I think that I’m close, but can’t get a successful compile.

Here is how I am adding that GoogleMap plugin in config.xml:

<plugin name="cordova-plugin-googlemaps" spec="2.3.6" source="npm" />
<variable name="API_KEY_FOR_ANDROID" value="aaaaaaaaaaaaaaaaaaaaaaaaaaa"/>
<variable name="API_KEY_FOR_IOS" value="" />

When the compilation fails, PhoneGap reports this error:

Error - One of your plugins requires a parameter: API_KEY_FOR_ANDROID

Apparently, I am not declaring the variable or its value correctly…

Any insights will be appreciated.

I think I asked this before - substituting a value for “aaaaaaaaaaaaaaaaaaaaaaaaaaa”?

Also, you’d better use the web interface instead of Thunderbird. I’m having to clean up every one of your messages.