Problem with object GoogleMap

I made an app that verifies and marks on the map my position every 30 seconds.

I uploaded the app as HTML to my server and it works perfectly watching it in the phone’s browser. But the app made with PhoneGap doesn’t work, it stays “thinking.”

What should I do to make it work?

I presume it is the same as using SMS which I have been playing with.

When using in phone gap you have to add a plugin to do the work.

There is a plugin here cordova-plugin-googlemaps - npm

<plugin name="cordova-plugin-googlemaps" spec="2.0.0">
<variable name="API_KEY_FOR_IOS" value="YOUR_IOS_API_KEY_IS_HERE" />
<variable name="LOCATION_WHEN_IN_USE_DESCRIPTION" value="My custom when in use message" />
<variable name="LOCATION_ALWAYS_USAGE_DESCRIPTION" value="My custom always usage message" />

So you have to add this to you project properties - config.xml

Hopefully this will do the trick.


Steve Warby

Hey, it didn’t work. I put the plugin with my API for Android, the rest I deleted because I do not use and did not enter the PhoneGap. Gave error immediately saying there was a problem in the XML file.

I put this (the value is an example):
<plugin name="cordova-plugin-googlemaps" spec="2.0.0"> <variable name="API_KEY_FOR_ANDROID" value=Alzafthgfhbfgnjfghfgbnfg456hgrtfdfgf665h /> </plugin>

Your chances of getting a useful answer improve if you include the error message.

Here is the error

And here is the portion of XML

Try adding quotation marks around the value.

Thanks MASTER. It Works propertly.